/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @endpointRule = '';
  
  checkConfig(config);
  @endpoint = getEndpoint('sophonsoar', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model BatchModifyInstanceStatusRequest {
  active?: int32(name='Active', description='Specifies whether to start or stop the playbook.

*   **0**: stops the playbook.
*   **1**: starts the playbook.

This parameter is required.', example='1'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID. If you want to specify multiple playbooks, separate the playbook UUIDs with commas (,).

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='8baa6cff-319e-4ede-97bc-1xxxxxx,s8df2e-s8dfs-xxxx'),
}

model BatchModifyInstanceStatusResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='358E012F-B516-599D-9ED0-A1A361CDE615'),
}

model BatchModifyInstanceStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchModifyInstanceStatusResponseBody(name='body'),
}

/**
 * @summary Modifies the statuses of playbooks at a time.
 *
 * @param request BatchModifyInstanceStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchModifyInstanceStatusResponse
 */
async function batchModifyInstanceStatusWithOptions(request: BatchModifyInstanceStatusRequest, runtime: $RuntimeOptions): BatchModifyInstanceStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  var body : map[string]any = {};
  if (!$isNull(request.active)) {
    body['Active'] = request.active;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchModifyInstanceStatus',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the statuses of playbooks at a time.
 *
 * @param request BatchModifyInstanceStatusRequest
 * @return BatchModifyInstanceStatusResponse
 */
async function batchModifyInstanceStatus(request: BatchModifyInstanceStatusRequest): BatchModifyInstanceStatusResponse {
  var runtime = new $RuntimeOptions{};
  return batchModifyInstanceStatusWithOptions(request, runtime);
}

model ComparePlaybooksRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  newPlaybookReleaseId?: int32(name='NewPlaybookReleaseId', description='The ID of the second version.

>  You can call the [DescribePlaybookReleases](~~DescribePlaybookReleases~~) operation to query the IDs of versions. The system automatically generates IDs for new versions.

This parameter is required.', example='sfdf2395-e814-459f-9662-xxxxx'),
  oldPlaybookReleaseId?: int32(name='OldPlaybookReleaseId', description='The ID of the first version.

>  You can call the [DescribePlaybookReleases](~~DescribePlaybookReleases~~) operation to query the IDs of versions. The system automatically generates IDs for new versions.

This parameter is required.', example='sflk23423-e814-459f-9662-xxxxx'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='f916b93e-e814-459f-9662-xxxxx'),
}

model ComparePlaybooksResponseBody = {
  compareResult?: {
    description?: string(name='Description', description='The description of the comparison result.', example='The first version adds one node compared to the second version'),
    new?: boolean(name='New', description='Indicates whether the second version provides more information than the first version. Valid values:

*   **true**
*   **false**', example='true'),
    same?: boolean(name='Same', description='Indicates whether the configurations of the two versions are the same. Valid values:

*   **true**
*   **false**', example='false'),
  }(name='CompareResult', description='The comparison result.'),
  requestId?: string(name='RequestId', description='The request ID.', example='2EC05B06-BF3C-5F3E-8FE8-3B1FAD76087A'),
}

model ComparePlaybooksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ComparePlaybooksResponseBody(name='body'),
}

/**
 * @summary Compares configurations between two versions of a published playbook.
 *
 * @param request ComparePlaybooksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ComparePlaybooksResponse
 */
async function comparePlaybooksWithOptions(request: ComparePlaybooksRequest, runtime: $RuntimeOptions): ComparePlaybooksResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.newPlaybookReleaseId)) {
    query['NewPlaybookReleaseId'] = request.newPlaybookReleaseId;
  }
  if (!$isNull(request.oldPlaybookReleaseId)) {
    query['OldPlaybookReleaseId'] = request.oldPlaybookReleaseId;
  }
  if (!$isNull(request.playbookUuid)) {
    query['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ComparePlaybooks',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Compares configurations between two versions of a published playbook.
 *
 * @param request ComparePlaybooksRequest
 * @return ComparePlaybooksResponse
 */
async function comparePlaybooks(request: ComparePlaybooksRequest): ComparePlaybooksResponse {
  var runtime = new $RuntimeOptions{};
  return comparePlaybooksWithOptions(request, runtime);
}

model ConvertPlaybookRequest {
  lang?: string(name='Lang', description='Language type for request and response messages. Values:

- **zh** (default): Chinese.
- **en**: English.', example='zh'),
  roleFor?: long(name='RoleFor', description='User ID for the administrator to switch to another member\\\\"s perspective.', example='13760*****718726'),
  roleType?: string(name='RoleType', description='View type. Values:

- 0: Current Alibaba Cloud account view.
- 1: View for all accounts under the enterprise.', example='0'),
  taskflow?: string(name='Taskflow', description='XML configuration information for playbook orchestration.

This parameter is required.', example='<?xml version=\\\\"1.0\\\\" encoding=\\\\"UTF-8\\\\"?>
<bpmn:definitions xmlns:xsi=\\\\"http://www.w3.org/2001/XMLSchema-instance\\\\" xmlns:bpmn=\\\\"http://www.omg.org/spec/BPMN/20100524/MODEL\\\\" xmlns:bpmndi=\\\\"http://www.omg.org/spec/BPMN/20100524/DI\\\\" xmlns:dc=\\\\"http://www.omg.org/spec/DD/20100524/DC\\\\" id=\\\\"Definitions_1\\\\" targetNamespace=\\\\"http://bpmn.io/schema/bpmn\\\\">
  <bpmn:process id=\\\\"Process_1\\\\" isExecutable=\\\\"false\\\\">
    <bpmn:startEvent id=\\\\"StartEvent_1\\\\" />
  </bpmn:process>
  <bpmndi:BPMNDiagram id=\\\\"BPMNDiagram_1\\\\">
     <bpmndi:BPMNPlane id=\\\\"BPMNPlane_1\\\\" bpmnElement=\\\\"Process_1\\\\">
           <bpmndi:BPMNShape id=\\\\"_BPMNShape_StartEvent_2\\\\" bpmnElement=\\\\"StartEvent_1\\\\">
                   <dc:Bounds x=\\\\"173\\\\" y=\\\\"102\\\\" width=\\\\"36\\\\" height=\\\\"36\\\\" />
            </bpmndi:BPMNShape>
     </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>'),
}

model ConvertPlaybookResponseBody = {
  config?: string(name='Config', description='The configurations.', example='{}'),
  requestId?: string(name='RequestId', description='The ID of this call request, which is a unique identifier generated by Alibaba Cloud for this request, and can be used for troubleshooting and problem localization.', example='39C38A34-****-*****-****-7263B435C316'),
}

model ConvertPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ConvertPlaybookResponseBody(name='body'),
}

/**
 * @summary Convert XML configuration.
 *
 * @description Please ensure that you fully understand the billing method and [pricing](https://www.aliyun.com/price/product#/sas/detail/sas) of the orchestration product before using this interface.
 *
 * @param request ConvertPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ConvertPlaybookResponse
 */
async function convertPlaybookWithOptions(request: ConvertPlaybookRequest, runtime: $RuntimeOptions): ConvertPlaybookResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.roleFor)) {
    query['RoleFor'] = request.roleFor;
  }
  if (!$isNull(request.roleType)) {
    query['RoleType'] = request.roleType;
  }
  var body : map[string]any = {};
  if (!$isNull(request.taskflow)) {
    body['Taskflow'] = request.taskflow;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ConvertPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Convert XML configuration.
 *
 * @description Please ensure that you fully understand the billing method and [pricing](https://www.aliyun.com/price/product#/sas/detail/sas) of the orchestration product before using this interface.
 *
 * @param request ConvertPlaybookRequest
 * @return ConvertPlaybookResponse
 */
async function convertPlaybook(request: ConvertPlaybookRequest): ConvertPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return convertPlaybookWithOptions(request, runtime);
}

model CopyPlaybookRequest {
  description?: string(name='Description', example='playbook description'),
  displayName?: string(name='DisplayName', description='This parameter is required.', example='playbook_xxx'),
  lang?: string(name='Lang', example='zh'),
  releaseVersion?: string(name='ReleaseVersion', example='0'),
  roleFor?: long(name='RoleFor', example='137602*****718726'),
  roleType?: string(name='RoleType', example='0'),
  sourcePlaybookUuid?: string(name='SourcePlaybookUuid', description='This parameter is required.', example='94bc318c-****-4cba-****-801ccb0d739f'),
}

model CopyPlaybookResponseBody = {
  data?: {
    active?: int32(name='Active', example='1'),
    description?: string(name='Description', example='This is a action of processing for WAF'),
    displayName?: string(name='DisplayName', example='11111'),
    failNum?: int32(name='FailNum', example='1'),
    failRate?: double(name='FailRate', example='0.5'),
    gmtCreate?: long(name='GmtCreate', example='1655951601000'),
    gmtModified?: long(name='GmtModified', example='1638270967000'),
    historyMd5?: int32(name='HistoryMd5', example='1'),
    inputParams?: string(name='InputParams', example='[{\\\\"name\\\\":\\\\"1\\\\",\\\\"dataType\\\\":\\\\"String\\\\",\\\\"required\\\\":false,\\\\"isArray\\\\":false,\\\\"example\\\\":\\\\"\\\\",\\\\"description\\\\":\\\\"\\\\",\\\\"id\\\\":0,\\\\"typeName\\\\":\\\\"String\\\\",\\\\"dataClass\\\\":\\\\"normal\\\\"}]'),
    lastRuntime?: long(name='LastRuntime', example='1725258397847'),
    logicReleaseTaskflowMd5?: string(name='LogicReleaseTaskflowMd5', example='037046****1b00c4717963818ccbf2xx'),
    outputParams?: string(name='OutputParams', example='[]'),
    ownType?: string(name='OwnType', example='user'),
    permission?: int32(name='Permission', example='1'),
    playbookStatus?: int32(name='PlaybookStatus', example='1'),
    playbookUuid?: string(name='PlaybookUuid', example='9e38111e-9794-4784-9ca8-xxxxxxx'),
    succNum?: int32(name='SuccNum', example='1'),
    tenantId?: string(name='TenantId', example='13760*****8718726'),
  }(name='Data'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='2EC05B06-****-5F3E-****-3B1FAD76087A'),
}

model CopyPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CopyPlaybookResponseBody(name='body'),
}

/**
 * @summary 剧本复制
 *
 * @param request CopyPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CopyPlaybookResponse
 */
async function copyPlaybookWithOptions(request: CopyPlaybookRequest, runtime: $RuntimeOptions): CopyPlaybookResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.roleFor)) {
    query['RoleFor'] = request.roleFor;
  }
  if (!$isNull(request.roleType)) {
    query['RoleType'] = request.roleType;
  }
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.displayName)) {
    body['DisplayName'] = request.displayName;
  }
  if (!$isNull(request.releaseVersion)) {
    body['ReleaseVersion'] = request.releaseVersion;
  }
  if (!$isNull(request.sourcePlaybookUuid)) {
    body['SourcePlaybookUuid'] = request.sourcePlaybookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CopyPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 剧本复制
 *
 * @param request CopyPlaybookRequest
 * @return CopyPlaybookResponse
 */
async function copyPlaybook(request: CopyPlaybookRequest): CopyPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return copyPlaybookWithOptions(request, runtime);
}

model CreatePlaybookRequest {
  description?: string(name='Description', description='Description of the playbook.', example='This is a new version'),
  displayName?: string(name='DisplayName', description='Name of the playbook.

This parameter is required.', example='test09'),
  lang?: string(name='Lang', description='Language type for receiving messages. Values:

- **zh** (default): Chinese
- **en**: English', example='zh'),
  taskflowType?: string(name='TaskflowType', description='Playbook TaskFlow type.
- **x6** : x6
- **bpmn**: bpmn', example='x6'),
}

model CreatePlaybookResponseBody = {
  data?: {
    playbookUuid?: string(name='PlaybookUuid', description='UUID of the newly created playbook.', example='9e38111e-9794-4784-9ca8-xxxxxxx'),
  }(name='Data', description='The result of the creation.'),
  requestId?: string(name='RequestId', description='The ID of this call request, a unique identifier generated by Alibaba Cloud for this request, which can be used to troubleshoot and locate issues.', example='B09B40B2-F11E-512C-B755-423F2056C17B'),
}

model CreatePlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreatePlaybookResponseBody(name='body'),
}

/**
 * @summary New Playbook.
 *
 * @description Create Playbook.
 *
 * @param request CreatePlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreatePlaybookResponse
 */
async function createPlaybookWithOptions(request: CreatePlaybookRequest, runtime: $RuntimeOptions): CreatePlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.displayName)) {
    body['DisplayName'] = request.displayName;
  }
  if (!$isNull(request.lang)) {
    body['Lang'] = request.lang;
  }
  if (!$isNull(request.taskflowType)) {
    body['TaskflowType'] = request.taskflowType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreatePlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary New Playbook.
 *
 * @description Create Playbook.
 *
 * @param request CreatePlaybookRequest
 * @return CreatePlaybookResponse
 */
async function createPlaybook(request: CreatePlaybookRequest): CreatePlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return createPlaybookWithOptions(request, runtime);
}

model DebugPlaybookRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='f916b93e-e814-459f-9662-xxxxx'),
  record?: string(name='Record', description='The input parameters that you use to debug the playbook. You can define the parameters based on your business requirements.', example='{
   "param1":"a",
   "param2":"b"
}'),
  taskflow?: string(name='Taskflow', description='The XML configuration of the playbook.

>  You can call the [DescribePlaybook](~~DescribePlaybook~~) operation to query the XML configuration of the playbook.

This parameter is required.', example='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>'),
}

model DebugPlaybookResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='75E56B2C-C8FA-5A2F-AA08-8745E2AC33EF'),
  requestUuid?: string(name='RequestUuid', description='The UUID of the debugging task. You can use the UUID to query the result and other details of the debugging task.', example='6d412cfa-0905-4567-8a83-xxxxxx'),
}

model DebugPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DebugPlaybookResponseBody(name='body'),
}

/**
 * @summary Debugs a playbook.
 *
 * @param request DebugPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DebugPlaybookResponse
 */
async function debugPlaybookWithOptions(request: DebugPlaybookRequest, runtime: $RuntimeOptions): DebugPlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.lang)) {
    body['Lang'] = request.lang;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.record)) {
    body['Record'] = request.record;
  }
  if (!$isNull(request.taskflow)) {
    body['Taskflow'] = request.taskflow;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DebugPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Debugs a playbook.
 *
 * @param request DebugPlaybookRequest
 * @return DebugPlaybookResponse
 */
async function debugPlaybook(request: DebugPlaybookRequest): DebugPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return debugPlaybookWithOptions(request, runtime);
}

model DeleteComponentAssetRequest {
  assetId?: long(name='AssetId', description='The ID of the asset.

>  You can call the [DescribeComponentAssets](~~DescribeComponentAssets~~) operation to query the ID.

This parameter is required.', example='12x'),
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
}

model DeleteComponentAssetResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='39C38A34-8532-5D44-B88A-7263B435C316'),
}

model DeleteComponentAssetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteComponentAssetResponseBody(name='body'),
}

/**
 * @summary Deletes the assets in a component.
 *
 * @param request DeleteComponentAssetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteComponentAssetResponse
 */
async function deleteComponentAssetWithOptions(request: DeleteComponentAssetRequest, runtime: $RuntimeOptions): DeleteComponentAssetResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.assetId)) {
    query['AssetId'] = request.assetId;
  }
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteComponentAsset',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes the assets in a component.
 *
 * @param request DeleteComponentAssetRequest
 * @return DeleteComponentAssetResponse
 */
async function deleteComponentAsset(request: DeleteComponentAssetRequest): DeleteComponentAssetResponse {
  var runtime = new $RuntimeOptions{};
  return deleteComponentAssetWithOptions(request, runtime);
}

model DeletePlaybookRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='e99dab31-499b-4307-9248-xxxxxx'),
}

model DeletePlaybookResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='6F3CA8A9-B5BB-506A-9182-FFE80A6E0584'),
}

model DeletePlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePlaybookResponseBody(name='body'),
}

/**
 * @summary Deletes a custom playbook.
 *
 * @param request DeletePlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePlaybookResponse
 */
async function deletePlaybookWithOptions(request: DeletePlaybookRequest, runtime: $RuntimeOptions): DeletePlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.lang)) {
    body['Lang'] = request.lang;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Deletes a custom playbook.
 *
 * @param request DeletePlaybookRequest
 * @return DeletePlaybookResponse
 */
async function deletePlaybook(request: DeletePlaybookRequest): DeletePlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return deletePlaybookWithOptions(request, runtime);
}

model DescribeComponentAssetFormRequest {
  componentName?: string(name='ComponentName', description='The component name.

This parameter is required.', example='python3'),
  lang?: string(name='Lang', description='The language of the content within the response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
}

model DescribeComponentAssetFormResponseBody = {
  componentAssetForm?: string(name='ComponentAssetForm', description='The metadata of the asset in the component. The value is a JSON array and contains the following fields:

*   **name**: the parameter name.
*   **defaultValue**: the default parameter value.
*   **description**: the parameter description.
*   **required**: indicates whether the parameter is required. Valid values: **true** and **false**.', example='[
    {
        "defaultValue": "",
        "description": "assetname",
        "name": "assetname",
        "required": true
    }
]'),
  requestId?: string(name='RequestId', description='The request ID.', example='9D1651AC-31CC-5CC4-A14E-626B3FCC1022'),
}

model DescribeComponentAssetFormResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeComponentAssetFormResponseBody(name='body'),
}

/**
 * @summary Queries the metadata of assets in a component. The metadata of an asset refers to the fields that describe the asset.
 *
 * @param request DescribeComponentAssetFormRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeComponentAssetFormResponse
 */
async function describeComponentAssetFormWithOptions(request: DescribeComponentAssetFormRequest, runtime: $RuntimeOptions): DescribeComponentAssetFormResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeComponentAssetForm',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the metadata of assets in a component. The metadata of an asset refers to the fields that describe the asset.
 *
 * @param request DescribeComponentAssetFormRequest
 * @return DescribeComponentAssetFormResponse
 */
async function describeComponentAssetForm(request: DescribeComponentAssetFormRequest): DescribeComponentAssetFormResponse {
  var runtime = new $RuntimeOptions{};
  return describeComponentAssetFormWithOptions(request, runtime);
}

model DescribeComponentAssetsRequest {
  componentName?: string(name='ComponentName', description='The name of the component.

This parameter is required.', example='python3'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
}

model DescribeComponentAssetsResponseBody = {
  componentAssets?: [ 
    {
      assetUuid?: string(name='AssetUuid', description='The UUID of the asset.', example='ff6fe161-93e2-464c-a326-fxxxxxx'),
      componentname?: string(name='Componentname', description='The name of the component to which the asset belongs.', example='pyhton3'),
      gmtCreate?: string(name='GmtCreate', description='The time when the asset was created. The time is in the yyyy-MM-ddTHH:mm:ssZ format and is displayed in UTC.', example='2023-03-23T14:38Z'),
      gmtModified?: string(name='GmtModified', description='The time when the asset was modified. The time is in the yyyy-MM-ddTHH:mm:ssZ format and is displayed in UTC.', example='2023-03-23T14:38Z'),
      id?: long(name='Id', description='The UUID of the asset.', example='7xx'),
      name?: string(name='Name', description='The name of the asset.', example='test asset'),
      params?: string(name='Params', description='The configurations of the asset in the JSON string format. DescribeComponentAssetForm

>  For more information, see [DescribeComponentAssetForm](~~DescribeComponentAssetForm~~).', example='[
    {
        "name": "authMethod",
        "value": "ak"
    },
    {
        "name": "accessKeyId",
        "value": "xxxxxxx"
    },
    {
        "name": "accessKeySecret",
        "value": "xxxxx"
    },
    {
        "name": "roleArn",
        "value": ""
    }
]'),
    }
  ](name='ComponentAssets', description='The information about the assets.'),
  requestId?: string(name='RequestId', description='The request ID.', example='BFEFB76D-DD0E-5529-BD57-0DAC10B9B30F'),
}

model DescribeComponentAssetsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeComponentAssetsResponseBody(name='body'),
}

/**
 * @summary Queries a list of assets in a component.
 *
 * @param request DescribeComponentAssetsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeComponentAssetsResponse
 */
async function describeComponentAssetsWithOptions(request: DescribeComponentAssetsRequest, runtime: $RuntimeOptions): DescribeComponentAssetsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeComponentAssets',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of assets in a component.
 *
 * @param request DescribeComponentAssetsRequest
 * @return DescribeComponentAssetsResponse
 */
async function describeComponentAssets(request: DescribeComponentAssetsRequest): DescribeComponentAssetsResponse {
  var runtime = new $RuntimeOptions{};
  return describeComponentAssetsWithOptions(request, runtime);
}

model DescribeComponentListRequest {
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='b724d2b0-3c3b-4223-9bfd-xxxxx'),
}

model DescribeComponentListResponseBody = {
  components?: string(name='Components', description='The information about the components. The value is a JSON array.', example='[
    {
        "actions": [
            {
                "description": "mysql component",
                "name": "storeIdb",
                "parameters": [
                    {
                        "description": "update the mysql db",
                        "name": "updateSql",
                        "required": false
                    }
                ]
            }
        ],
        "basic": {
            "description": "mysq sql component for 5.6",
            "logo": "https://img.alicdn.com/tfs/TB1H89IpH3nBKNjSZFMXXaUSFXa-200-200.svg",
            "name": "Mysql"
        }
    }
]'),
  requestId?: string(name='RequestId', description='The request ID.', example='B0A255B3-495C-56FB-8B6B-DB073F80388A'),
}

model DescribeComponentListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeComponentListResponseBody(name='body'),
}

/**
 * @summary Queries a list of common components that are available.
 *
 * @param request DescribeComponentListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeComponentListResponse
 */
async function describeComponentListWithOptions(request: DescribeComponentListRequest, runtime: $RuntimeOptions): DescribeComponentListResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeComponentList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of common components that are available.
 *
 * @param request DescribeComponentListRequest
 * @return DescribeComponentListResponse
 */
async function describeComponentList(request: DescribeComponentListRequest): DescribeComponentListResponse {
  var runtime = new $RuntimeOptions{};
  return describeComponentListWithOptions(request, runtime);
}

model DescribeComponentPlaybookRequest {
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='ac343acc-1a61-4084-9a1cxxxxx'),
}

model DescribeComponentPlaybookResponseBody = {
  playbooks?: [ 
    {
      description?: string(name='Description', description='The description of the predefined component.', example='aegis_kill_process'),
      displayName?: string(name='DisplayName', description='The name of the predefined component.', example='AegisKillQuara'),
      inputParams?: string(name='InputParams', description='The input parameter configuration of the playbook. The value is a JSON array.

>  For more information, see [DescribePlaybookInputOutput](~~DescribePlaybookInputOutput~~).', example='[
    {
        "typeName": "String",
        "dataClass": "normal",
        "dataType": "String",
        "description": "period",
        "example": "",
        "name": "period",
        "required": false
    }
]'),
    }
  ](name='Playbooks', description='The information about the predefined components.'),
  requestId?: string(name='RequestId', description='The request ID.', example='C5F5D6C9-DF1A-5381-92B1-39676F777D20'),
}

model DescribeComponentPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeComponentPlaybookResponseBody(name='body'),
}

/**
 * @summary Queries a list of predefined components that are available.
 *
 * @param request DescribeComponentPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeComponentPlaybookResponse
 */
async function describeComponentPlaybookWithOptions(request: DescribeComponentPlaybookRequest, runtime: $RuntimeOptions): DescribeComponentPlaybookResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeComponentPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of predefined components that are available.
 *
 * @param request DescribeComponentPlaybookRequest
 * @return DescribeComponentPlaybookResponse
 */
async function describeComponentPlaybook(request: DescribeComponentPlaybookRequest): DescribeComponentPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return describeComponentPlaybookWithOptions(request, runtime);
}

model DescribeComponentsJsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
}

model DescribeComponentsJsResponseBody = {
  componentsJs?: string(name='ComponentsJs', description='The configuration of the JavaScript file for the component.', example='[
    {
        "js": "https://xxxxx.oss-cn-zhangjiakou.aliyuncs.com/componentUpload/xxxxx",
        "name": "python3",
        "ownType": "sys"
    }
]'),
  requestId?: string(name='RequestId', description='The request ID.', example='58A518BC-E4A8-5BD7-AFEA-366046ED9073'),
}

model DescribeComponentsJsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeComponentsJsResponseBody(name='body'),
}

/**
 * @summary Queries the JavaScript file of a component. The component uses the returned JavaScript file for page rendering.
 *
 * @param request DescribeComponentsJsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeComponentsJsResponse
 */
async function describeComponentsJsWithOptions(request: DescribeComponentsJsRequest, runtime: $RuntimeOptions): DescribeComponentsJsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeComponentsJs',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the JavaScript file of a component. The component uses the returned JavaScript file for page rendering.
 *
 * @param request DescribeComponentsJsRequest
 * @return DescribeComponentsJsResponse
 */
async function describeComponentsJs(request: DescribeComponentsJsRequest): DescribeComponentsJsResponse {
  var runtime = new $RuntimeOptions{};
  return describeComponentsJsWithOptions(request, runtime);
}

model DescribeDistinctReleasesRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='bc0b8424-535c-4ed5-bd94-xxxxxx'),
  taskflowMd5?: string(name='TaskflowMd5', description='The MD5 value of the playbook XML configuration.', example='be0a4ef084dd174abe47xxxxx'),
}

model DescribeDistinctReleasesResponseBody = {
  records?: [ 
    {
      description?: string(name='Description', description='The version description.', example='demo version'),
      taskflowMd5?: string(name='TaskflowMd5', description='The MD5 value of the version XML configuration.', example='17cf53049bc8efa941207xxxxx'),
      taskflowType?: string(name='TaskflowType', description='The format of the playbook. Valid values:

*   **xml**: XML format.
*   **x6**: JSON format.', example='x6'),
    }
  ](name='Records', description='The information about versions.'),
  requestId?: string(name='RequestId', description='The request ID.', example='145CACF6-D276-5197-8549-CB1AD76E2AC8'),
}

model DescribeDistinctReleasesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDistinctReleasesResponseBody(name='body'),
}

/**
 * @summary Queries the information about the published versions of a playbook after deduplication.
 *
 * @param request DescribeDistinctReleasesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDistinctReleasesResponse
 */
async function describeDistinctReleasesWithOptions(request: DescribeDistinctReleasesRequest, runtime: $RuntimeOptions): DescribeDistinctReleasesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDistinctReleases',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the information about the published versions of a playbook after deduplication.
 *
 * @param request DescribeDistinctReleasesRequest
 * @return DescribeDistinctReleasesResponse
 */
async function describeDistinctReleases(request: DescribeDistinctReleasesRequest): DescribeDistinctReleasesResponse {
  var runtime = new $RuntimeOptions{};
  return describeDistinctReleasesWithOptions(request, runtime);
}

model DescribeEnumItemsRequest {
  enumType?: string(name='EnumType', description='The type of the enumeration item. Valid values:

*   **process**: scenarios

This parameter is required.', example='process'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh_cn**: Simplified Chinese (default)
*   **en_us**: English', example='zh'),
}

model DescribeEnumItemsResponseBody = {
  data?: [ 
    {
      key?: string(name='Key', description='The key of the enumeration item.', example='system_xxxxx_process_book'),
      value?: string(name='Value', description='The value of the enumeration item.', example='system_xxxxx_process_book'),
    }
  ](name='Data', description='The information about the enumeration item.'),
  requestId?: string(name='RequestId', description='The request ID.', example='E7698CFB-4E1C-5840-8EC9-691B86729E94'),
}

model DescribeEnumItemsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeEnumItemsResponseBody(name='body'),
}

/**
 * @summary Queries enumeration items that are required by a cloud service.
 *
 * @param request DescribeEnumItemsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeEnumItemsResponse
 */
async function describeEnumItemsWithOptions(request: DescribeEnumItemsRequest, runtime: $RuntimeOptions): DescribeEnumItemsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeEnumItems',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries enumeration items that are required by a cloud service.
 *
 * @param request DescribeEnumItemsRequest
 * @return DescribeEnumItemsResponse
 */
async function describeEnumItems(request: DescribeEnumItemsRequest): DescribeEnumItemsResponse {
  var runtime = new $RuntimeOptions{};
  return describeEnumItemsWithOptions(request, runtime);
}

model DescribeExecutePlaybooksRequest {
  inputMode?: string(name='InputMode', description='The entity type of the script input parameter. When you want to query multiple entity types, separate them with commas.
- **ip**: IP entity.
- **file**: file entity.
- **process**: process entity.
- **incident**: incident entity.', example='ip,file,process,host'),
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  paramType?: string(name='ParamType', description='The input parameter type of the playbook.

*   **template-ip**
*   **template-file**
*   **template-process**
*   **custom**', example='custom'),
  playbookName?: string(name='PlaybookName', description='The playbook name. Fuzzy search is supported.', example='demo_test'),
  uuid?: string(name='Uuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the playbook UUID.', example='f916b93e-e814-459f-9662-xxxxxx'),
}

model DescribeExecutePlaybooksResponseBody = {
  playbookMetrics?: [ 
    {
      description?: string(name='Description', description='The playbook description.', example='a demo playbook'),
      displayName?: string(name='DisplayName', description='The playbook name.', example='demo_playbook'),
      paramConfig?: string(name='ParamConfig', description='The configuration of the input parameter. The value is a JSON array.

>  For more information, see [DescribePlaybookInputOutput](~~DescribePlaybookInputOutput~~).', example='[
    {
        "typeName": "String",
        "dataClass": "normal",
        "dataType": "String",
        "description": "period",
        "example": "",
        "name": "period",
        "required": false
    }
]'),
      paramType?: string(name='ParamType', description='The input parameter type of the playbook.

*   **template-ip**
*   **template-file**
*   **template-process**
*   **custom**', example='custom'),
      uuid?: string(name='Uuid', description='The playbook UUID.', example='c5c88b5e-97ca-435d-8c20-2xxxxx'),
    }
  ](name='PlaybookMetrics', description='The playbook.'),
  requestId?: string(name='RequestId', description='The request ID.', example='88A39217-2802-5B1E-BA2B-CF1BBC43C1F5'),
}

model DescribeExecutePlaybooksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeExecutePlaybooksResponseBody(name='body'),
}

/**
 * @summary Queries the playbooks that are available for an automatic response plan.
 *
 * @param request DescribeExecutePlaybooksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeExecutePlaybooksResponse
 */
async function describeExecutePlaybooksWithOptions(request: DescribeExecutePlaybooksRequest, runtime: $RuntimeOptions): DescribeExecutePlaybooksResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeExecutePlaybooks',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the playbooks that are available for an automatic response plan.
 *
 * @param request DescribeExecutePlaybooksRequest
 * @return DescribeExecutePlaybooksResponse
 */
async function describeExecutePlaybooks(request: DescribeExecutePlaybooksRequest): DescribeExecutePlaybooksResponse {
  var runtime = new $RuntimeOptions{};
  return describeExecutePlaybooksWithOptions(request, runtime);
}

model DescribeFieldRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  queryKey?: string(name='QueryKey', description='The key of the global configuration. Valid values:

*   **soar_filed_tags**: queries the input template of the playbook.

This parameter is required.', example='soar_filed_tags'),
}

model DescribeFieldResponseBody = {
  fields?: string(name='Fields', description='The configuration content.', example='["ip","name","hostinfo","md5"]'),
  name?: string(name='Name', description='The name of the global configuration.', example='soar_filed_tags'),
  requestId?: string(name='RequestId', description='The request ID.', example='BCDE6498-83CC-50A1-8307-3D5A539C42F8'),
}

model DescribeFieldResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeFieldResponseBody(name='body'),
}

/**
 * @summary Queries the global configuration information about a cloud service.
 *
 * @param request DescribeFieldRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeFieldResponse
 */
async function describeFieldWithOptions(request: DescribeFieldRequest, runtime: $RuntimeOptions): DescribeFieldResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeField',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the global configuration information about a cloud service.
 *
 * @param request DescribeFieldRequest
 * @return DescribeFieldResponse
 */
async function describeField(request: DescribeFieldRequest): DescribeFieldResponse {
  var runtime = new $RuntimeOptions{};
  return describeFieldWithOptions(request, runtime);
}

model DescribeGroupProductionsRequest {
  lang?: string(name='Lang', example='zh'),
  roleFor?: long(name='RoleFor', example='1182415068150980'),
  roleType?: string(name='RoleType', example='0'),
}

model DescribeGroupProductionsResponseBody = {
  data?: [ 
    {
      groupName?: string(name='GroupName'),
      productions?: [ 
        {
          code?: string(name='Code', example='Rds'),
          defaultDomain?: string(name='DefaultDomain', example='rds.aliyuncs.com'),
          defaultVersion?: string(name='DefaultVersion', example='2014-08-15'),
          description?: string(name='Description'),
          fullDomains?: [ string ](name='FullDomains'),
          group?: string(name='Group'),
          name?: string(name='Name'),
          policyList?: [ 
            {
              policyName?: string(name='PolicyName', example='AliyunRAMReadOnlyAccess'),
              type?: string(name='Type'),
            }
          ](name='PolicyList'),
          ramCode?: string(name='RamCode', example='rds'),
          shortName?: string(name='ShortName', example='RDS'),
          source?: string(name='Source', example='next'),
          versions?: [ string ](name='Versions'),
        }
      ](name='Productions'),
    }
  ](name='Data'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='100'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='358E012F-B516-599D-9ED0-A1A361CDE615'),
}

model DescribeGroupProductionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupProductionsResponseBody(name='body'),
}

/**
 * @summary 获取OpenAPI的产品列表
 *
 * @param request DescribeGroupProductionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupProductionsResponse
 */
async function describeGroupProductionsWithOptions(request: DescribeGroupProductionsRequest, runtime: $RuntimeOptions): DescribeGroupProductionsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeGroupProductions',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取OpenAPI的产品列表
 *
 * @param request DescribeGroupProductionsRequest
 * @return DescribeGroupProductionsResponse
 */
async function describeGroupProductions(request: DescribeGroupProductionsRequest): DescribeGroupProductionsResponse {
  var runtime = new $RuntimeOptions{};
  return describeGroupProductionsWithOptions(request, runtime);
}

model DescribeLatestRecordSchemaRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='c5c88b5e-97ca-435d-8c20-xxxxxx'),
}

model DescribeLatestRecordSchemaResponseBody = {
  playbookNodeSchema?: {
    nodeSchema?: [ 
      {
        actionName?: string(name='ActionName', description='The action name of the component.', example='formatedata'),
        componentName?: string(name='ComponentName', description='The name of the component.', example='DataFormat'),
        nodeName?: string(name='NodeName', description='The name of the node.', example='DataFormat_1'),
        outputFields?: [ string ](name='OutputFields', description='The output fields.'),
      }
    ](name='NodeSchema', description='The structure information.'),
  }(name='PlaybookNodeSchema', description='The output structure information of the playbook.'),
  requestId?: string(name='RequestId', description='The request ID.', example='10B92EE1-4597-593B-A131-7A17D25EF5C9'),
}

model DescribeLatestRecordSchemaResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeLatestRecordSchemaResponseBody(name='body'),
}

/**
 * @summary Queries the output structure information of each node in a playbook based on the most recent running record of the playbook.
 *
 * @param request DescribeLatestRecordSchemaRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeLatestRecordSchemaResponse
 */
async function describeLatestRecordSchemaWithOptions(request: DescribeLatestRecordSchemaRequest, runtime: $RuntimeOptions): DescribeLatestRecordSchemaResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeLatestRecordSchema',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the output structure information of each node in a playbook based on the most recent running record of the playbook.
 *
 * @param request DescribeLatestRecordSchemaRequest
 * @return DescribeLatestRecordSchemaResponse
 */
async function describeLatestRecordSchema(request: DescribeLatestRecordSchemaRequest): DescribeLatestRecordSchemaResponse {
  var runtime = new $RuntimeOptions{};
  return describeLatestRecordSchemaWithOptions(request, runtime);
}

model DescribeNodeParamTagsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  nodeName?: string(name='NodeName', description='The name of the node.

This parameter is required.', example='python3_2'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxxxxx'),
}

model DescribeNodeParamTagsResponseBody = {
  paramReferredPaths?: [ 
    {
      paramName?: string(name='ParamName', description='The name of the upstream node.', example='DataFormat_1'),
      referredPath?: [ string ](name='ReferredPath', description='The paths.'),
    }
  ](name='ParamReferredPaths', description='The configuration of the recommended path.'),
  requestId?: string(name='RequestId', description='The request ID.', example='6BE94351-712A-505D-A40A-BC77CC8254A9'),
}

model DescribeNodeParamTagsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNodeParamTagsResponseBody(name='body'),
}

/**
 * @summary Queries recommended dynamic input parameters of a component for playbook orchestration.
 *
 * @param request DescribeNodeParamTagsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNodeParamTagsResponse
 */
async function describeNodeParamTagsWithOptions(request: DescribeNodeParamTagsRequest, runtime: $RuntimeOptions): DescribeNodeParamTagsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeNodeParamTags',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries recommended dynamic input parameters of a component for playbook orchestration.
 *
 * @param request DescribeNodeParamTagsRequest
 * @return DescribeNodeParamTagsResponse
 */
async function describeNodeParamTags(request: DescribeNodeParamTagsRequest): DescribeNodeParamTagsResponse {
  var runtime = new $RuntimeOptions{};
  return describeNodeParamTagsWithOptions(request, runtime);
}

model DescribeNodeUsedInfosRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  nodeName?: string(name='NodeName', description='The node name of the component.

This parameter is required.', example='python3_2'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxx'),
}

model DescribeNodeUsedInfosResponseBody = {
  nodeUsedInfos?: string(name='NodeUsedInfos', description='The node reference information. The value is in the JSON format and contains the following fields:

*   **action**: the referencing action. This field contains the following information:

    *   **name**: the name of the referencing node.
    *   **inputParams**: the parameter settings of the referencing node.', example='{
    "action": [
        {
            "name": "query_books",
            "inputParams": [
                {
                    "referInfos": [
                        "${play_group.datalist.*.ids}"
                    ],
                    "name": "querySql"
                }
            ]
        }
    ]
}'),
  requestId?: string(name='RequestId', description='The request ID.', example='3B10F836-C2B1-54FA-AB59-7591B548FB59'),
}

model DescribeNodeUsedInfosResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNodeUsedInfosResponseBody(name='body'),
}

/**
 * @summary Queries the nodes that reference the same node in a playbook.
 *
 * @param request DescribeNodeUsedInfosRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNodeUsedInfosResponse
 */
async function describeNodeUsedInfosWithOptions(request: DescribeNodeUsedInfosRequest, runtime: $RuntimeOptions): DescribeNodeUsedInfosResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeNodeUsedInfos',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the nodes that reference the same node in a playbook.
 *
 * @param request DescribeNodeUsedInfosRequest
 * @return DescribeNodeUsedInfosResponse
 */
async function describeNodeUsedInfos(request: DescribeNodeUsedInfosRequest): DescribeNodeUsedInfosResponse {
  var runtime = new $RuntimeOptions{};
  return describeNodeUsedInfosWithOptions(request, runtime);
}

model DescribeNotifyTemplateListRequest {
  lang?: string(name='Lang', example='zh'),
  roleFor?: long(name='RoleFor', example='137602425xxx8726'),
  roleType?: string(name='RoleType', example='0'),
}

model DescribeNotifyTemplateListResponseBody = {
  data?: [ 
    {
      content?: string(name='Content', example='Dear $aliyunUID : Cloud Security Center Threat Analysis and Response has detected a newly discovered security incident $incidentName(Incident id :$incidentID) in $startTime, Please go to Cloud Security Center Console View.'),
      eventId?: string(name='EventId', example='yundun_soar_incident_generate'),
      params?: string(name='Params', example='[\\\\"aliyunUID\\\\",\\\\"incidentName\\\\",\\\\"incidentID\\\\",\\\\"startTime\\\\"]'),
      subject?: string(name='Subject', example='[Alibaba Cloud Threat Analysis and Response] has detected a newly discovered security incident $incidentName($incidentID)'),
      templateName?: string(name='TemplateName', example='incident generate'),
    }
  ](name='Data'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='30'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='B3FED5B9-190A-5952-93A4-24FBF0F0C573'),
}

model DescribeNotifyTemplateListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeNotifyTemplateListResponseBody(name='body'),
}

/**
 * @summary 查询通知消息模版列表
 *
 * @param request DescribeNotifyTemplateListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeNotifyTemplateListResponse
 */
async function describeNotifyTemplateListWithOptions(request: DescribeNotifyTemplateListRequest, runtime: $RuntimeOptions): DescribeNotifyTemplateListResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeNotifyTemplateList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询通知消息模版列表
 *
 * @param request DescribeNotifyTemplateListRequest
 * @return DescribeNotifyTemplateListResponse
 */
async function describeNotifyTemplateList(request: DescribeNotifyTemplateListRequest): DescribeNotifyTemplateListResponse {
  var runtime = new $RuntimeOptions{};
  return describeNotifyTemplateListWithOptions(request, runtime);
}

model DescribeOpenApiInfoRequest {
  apiName?: string(name='ApiName', description='This parameter is required.', example='DescribePopApiItemList'),
  apiVersion?: string(name='ApiVersion', description='This parameter is required.', example='2018-12-03'),
  lang?: string(name='Lang', example='zh'),
  popCode?: string(name='PopCode', description='This parameter is required.', example='Sas'),
  roleFor?: long(name='RoleFor', example='1592757xxx002956'),
  roleType?: string(name='RoleType', example='0'),
}

model DescribeOpenApiInfoResponseBody = {
  data?: {
    description?: string(name='Description', example='describeEcs'),
    inputParams?: string(name='InputParams', example='{}'),
    outputParams?: string(name='OutputParams', example='[]'),
    responseDemo?: string(name='ResponseDemo', example='[]'),
    summary?: string(name='Summary', example='describeEcs'),
    title?: string(name='Title', example='describeEcs'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='358E012F-B516-599D-9ED0-A1A361CDE615'),
}

model DescribeOpenApiInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOpenApiInfoResponseBody(name='body'),
}

/**
 * @summary 获取产品接口的详情
 *
 * @param request DescribeOpenApiInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOpenApiInfoResponse
 */
async function describeOpenApiInfoWithOptions(request: DescribeOpenApiInfoRequest, runtime: $RuntimeOptions): DescribeOpenApiInfoResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeOpenApiInfo',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取产品接口的详情
 *
 * @param request DescribeOpenApiInfoRequest
 * @return DescribeOpenApiInfoResponse
 */
async function describeOpenApiInfo(request: DescribeOpenApiInfoRequest): DescribeOpenApiInfoResponse {
  var runtime = new $RuntimeOptions{};
  return describeOpenApiInfoWithOptions(request, runtime);
}

model DescribeOpenApiListRequest {
  apiName?: string(name='ApiName', example='DescribePopApiItemList'),
  apiVersion?: string(name='ApiVersion', description='This parameter is required.', example='2021-10-01'),
  lang?: string(name='Lang', example='zh'),
  popCode?: string(name='PopCode', description='This parameter is required.', example='Sas'),
  roleFor?: long(name='RoleFor', example='137602xxx8718726'),
  roleType?: string(name='RoleType', example='0'),
}

model DescribeOpenApiListResponseBody = {
  data?: {
    code?: string(name='Code', example='200'),
    directories?: any(name='Directories', example='[{"apis":[{"summary":"get account information","deprecated":false,"name":"DescAccountSummary","title":"get account information"}],"childrens":[],"title":"account"}]'),
    version?: string(name='Version', example='2018-12-03'),
  }(name='Data'),
  requestId?: string(name='RequestId', example='EF2ECA2D-D8E6-5021-BF5C-19DD6D52C5B2'),
}

model DescribeOpenApiListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeOpenApiListResponseBody(name='body'),
}

/**
 * @summary 获取产品的接口列表
 *
 * @param request DescribeOpenApiListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeOpenApiListResponse
 */
async function describeOpenApiListWithOptions(request: DescribeOpenApiListRequest, runtime: $RuntimeOptions): DescribeOpenApiListResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeOpenApiList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取产品的接口列表
 *
 * @param request DescribeOpenApiListRequest
 * @return DescribeOpenApiListResponse
 */
async function describeOpenApiList(request: DescribeOpenApiListRequest): DescribeOpenApiListResponse {
  var runtime = new $RuntimeOptions{};
  return describeOpenApiListWithOptions(request, runtime);
}

model DescribePlaybookRequest {
  debugFlag?: int32(name='DebugFlag', description='The flag that indicates whether the playbook is of the debugging or published version. Valid values:

*   **1**: playbook of the debugging version
*   **0**: playbook of the published version', example='0'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='9030076b-6733-4842-b05a-xxxxx'),
  taskflowMd5?: string(name='TaskflowMd5', description='The MD5 hash value of the playbook.', example='7a8f608dc64c242632aa578xxxxx'),
}

model DescribePlaybookResponseBody = {
  playbook?: {
    description?: string(name='Description', description='The description of the playbook.', example='demo playbook'),
    displayName?: string(name='DisplayName', description='The display name of the playbook.', example='demo_test'),
    failExeNum?: int32(name='FailExeNum', description='The number of times that the playbook failed to be run.', example='1'),
    gmtCreate?: string(name='GmtCreate', description='The creation time of the playbook. The value is a 13-digit timestamp.', example='1665288858000'),
    gmtModified?: string(name='GmtModified', description='The modification time of the playbook. The value is a 13-digit timestamp.', example='1677482519000'),
    inputParams?: string(name='InputParams', description='The input parameter configuration of the playbook. The value is a JSON array.

>  For more information, see [DescribePlaybookInputOutput](~~DescribePlaybookInputOutput~~).', example='[
    {
        "typeName": "String",
        "dataClass": "normal",
        "dataType": "String",
        "description": "period",
        "example": "",
        "name": "period",
        "required": false
    }
]'),
    lastExeTime?: long(name='LastExeTime', description='The time when the playbook was last run. The value is a 13-digit timestamp.', example='1665288858000'),
    onlineActive?: boolean(name='OnlineActive', description='The status of the playbook. Valid values:

*   **0**: disabled
*   **1**: enabled', example='0'),
    onlineReleaseTaskflowMd5?: string(name='OnlineReleaseTaskflowMd5', description='The MD5 hash value in the latest published version of the playbook.', example='asdfsdfe232-e2b2-44fd-b2cc-xxxxx'),
    ownType?: string(name='OwnType', description='The type of the playbook. Valid values:

*   **preset**: predefined playbook
*   **user**: custom playbook', example='preset'),
    playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.', example='8db257d3-e2b2-44fd-b2cc-xxxxx'),
    successExeNum?: int32(name='SuccessExeNum', description='The number of times that the playbook was successfully run.', example='100'),
    taskflow?: string(name='Taskflow', description='The XML configuration of the playbook.', example='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>'),
    taskflowType?: string(name='TaskflowType', description='The playbook configuration type.
*   **xml**: XML format.
*   **x6**: JSON format.', example='xml'),
  }(name='Playbook', description='The configuration of the playbook.'),
  requestId?: string(name='RequestId', description='The request ID.', example='2989BC59-E9F0-5C83-B453-B368857649C8'),
}

model DescribePlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookResponseBody(name='body'),
}

/**
 * @summary Queries the XML configuration of a playbook.
 *
 * @param request DescribePlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookResponse
 */
async function describePlaybookWithOptions(request: DescribePlaybookRequest, runtime: $RuntimeOptions): DescribePlaybookResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the XML configuration of a playbook.
 *
 * @param request DescribePlaybookRequest
 * @return DescribePlaybookResponse
 */
async function describePlaybook(request: DescribePlaybookRequest): DescribePlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookWithOptions(request, runtime);
}

model DescribePlaybookInputOutputRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='b724d2b0-3c3b-4223-9bfd-xxxxxxx'),
}

model DescribePlaybookInputOutputResponseBody = {
  config?: {
    exeConfig?: string(name='ExeConfig', description='The execution method of the playbook is in JSONObject format.'),
    inputParams?: string(name='InputParams', description='The input parameter configuration of the playbook. The value is a JSON array.', example='[
    {
        "typeName": "String",
        "dataClass": "normal",
        "dataType": "String",
        "description": "period",
        "example": "",
        "name": "period",
        "required": false
    }
]'),
    outputParams?: string(name='OutputParams', description='The output parameter configuration. This parameter is unavailable and is always left empty.', example='[]'),
    paramType?: string(name='ParamType', description='The input parameter type of the playbook. Valid values:

*   **template-ip**
*   **template-file**
*   **template-process**
*   **custom**', example='custom'),
    playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.', example='9030076b-6733-4842-b05a-xxxxxx'),
  }(name='Config', description='The configurations.'),
  requestId?: string(name='RequestId', description='The request ID.', example='688B4CCD-5272-5DCF-9D76-FE5EFEF545F8'),
}

model DescribePlaybookInputOutputResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookInputOutputResponseBody(name='body'),
}

/**
 * @summary Queries the input and output parameter configurations of a playbook.
 *
 * @param request DescribePlaybookInputOutputRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookInputOutputResponse
 */
async function describePlaybookInputOutputWithOptions(request: DescribePlaybookInputOutputRequest, runtime: $RuntimeOptions): DescribePlaybookInputOutputResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybookInputOutput',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the input and output parameter configurations of a playbook.
 *
 * @param request DescribePlaybookInputOutputRequest
 * @return DescribePlaybookInputOutputResponse
 */
async function describePlaybookInputOutput(request: DescribePlaybookInputOutputRequest): DescribePlaybookInputOutputResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookInputOutputWithOptions(request, runtime);
}

model DescribePlaybookMetricsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='2a687089-d4dd-47d4-9709-xxxxxx'),
}

model DescribePlaybookMetricsResponseBody = {
  metrics?: {
    active?: int32(name='Active', description='The status of the playbook. Valid values:

*   **1**: enabled
*   **0**: disabled', example='1'),
    description?: string(name='Description', description='The description of the playbook.', example='This is a playbook for waf processing'),
    displayName?: string(name='DisplayName', description='The name of the playbook.', example='demo name'),
    failNum?: int32(name='FailNum', description='The number of the tasks that are created for the playbook and failed to run.', example='10'),
    gmtCreate?: long(name='GmtCreate', description='The time when the playbook was created. The value is a 13-digit timestamp.', example='1655277397000'),
    historyMd5?: int32(name='HistoryMd5', description='The number of historical versions of the playbook.', example='10'),
    lastRuntime?: long(name='LastRuntime', description='The time when the playbook was last run. The value is a 13-digit timestamp.', example='1683526277415'),
    ownType?: string(name='OwnType', description='The type of the playbook. Valid values:

*   **preset**: predefined playbook
*   **user**: custom playbook', example='user'),
    playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.', example='0fbc9bdb-9ae3-4ef4-a709-xxxxx'),
    succNum?: int32(name='SuccNum', description='The number of the tasks that are created for the playbook and were successfully run.', example='100'),
  }(name='Metrics', description='The details of the playbook.'),
  requestId?: string(name='RequestId', description='The request ID.', example='567D3D0B-2153-5860-BF9A-F9DEED55FB73'),
}

model DescribePlaybookMetricsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookMetricsResponseBody(name='body'),
}

/**
 * @summary Queries the metrics of a playbook. The metrics include the playbook name, playbook description, the number of times that the playbook is run, and the failure rate of the playbook.
 *
 * @param request DescribePlaybookMetricsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookMetricsResponse
 */
async function describePlaybookMetricsWithOptions(request: DescribePlaybookMetricsRequest, runtime: $RuntimeOptions): DescribePlaybookMetricsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybookMetrics',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the metrics of a playbook. The metrics include the playbook name, playbook description, the number of times that the playbook is run, and the failure rate of the playbook.
 *
 * @param request DescribePlaybookMetricsRequest
 * @return DescribePlaybookMetricsResponse
 */
async function describePlaybookMetrics(request: DescribePlaybookMetricsRequest): DescribePlaybookMetricsResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookMetricsWithOptions(request, runtime);
}

model DescribePlaybookNodesOutputRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  nodeName?: string(name='NodeName', description='The name of the component node.

This parameter is required.', example='DataFormat_1'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxxx'),
}

model DescribePlaybookNodesOutputResponseBody = {
  playbookNodesOutput?: {
    nodeName?: string(name='NodeName', description='The name of the component node.', example='DataFormat_1'),
    nodeOutput?: string(name='NodeOutput', description='The historical output data of the component node. The value is in the JSON string format. If no data is found, the parameter is left empty.', example='{
    "datalist": [
        {
            "score": "10",
            "ip": "1.1.1.1"
        }
    ],
    "total_data_successful": 1,
    "filter_total_data": 1,
    "total_data": 1,
    "total_exe_successful": 1,
    "total_exe": 1,
    "total_data_with_dup": 1,
    "filter_total_data_successful": 1,
    "status": true
}'),
  }(name='PlaybookNodesOutput', description='The output data of the component node.'),
  requestId?: string(name='RequestId', description='The request ID.', example='A491170C-FE1F-520E-83D4-72ED205B72ED'),
}

model DescribePlaybookNodesOutputResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookNodesOutputResponseBody(name='body'),
}

/**
 * @summary Queries the historical output data of a component node.
 *
 * @param request DescribePlaybookNodesOutputRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookNodesOutputResponse
 */
async function describePlaybookNodesOutputWithOptions(request: DescribePlaybookNodesOutputRequest, runtime: $RuntimeOptions): DescribePlaybookNodesOutputResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybookNodesOutput',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the historical output data of a component node.
 *
 * @param request DescribePlaybookNodesOutputRequest
 * @return DescribePlaybookNodesOutputResponse
 */
async function describePlaybookNodesOutput(request: DescribePlaybookNodesOutputRequest): DescribePlaybookNodesOutputResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookNodesOutputWithOptions(request, runtime);
}

model DescribePlaybookNumberMetricsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
}

model DescribePlaybookNumberMetricsResponseBody = {
  metrics?: {
    startUpNum?: int32(name='StartUpNum', description='The number of enabled playbooks.', example='50'),
    totalNum?: int32(name='TotalNum', description='The total number of playbooks.', example='100'),
  }(name='Metrics', description='The statistics.'),
  requestId?: string(name='RequestId', description='The request ID.', example='D4CC979E-3D5B-5A6A-BC87-C93C9E861C7B'),
}

model DescribePlaybookNumberMetricsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookNumberMetricsResponseBody(name='body'),
}

/**
 * @summary Queries the statistics of Security Orchestration Automation Response (SOAR), such as the numbers of created and enabled playbooks.
 *
 * @param request DescribePlaybookNumberMetricsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookNumberMetricsResponse
 */
async function describePlaybookNumberMetricsWithOptions(request: DescribePlaybookNumberMetricsRequest, runtime: $RuntimeOptions): DescribePlaybookNumberMetricsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybookNumberMetrics',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the statistics of Security Orchestration Automation Response (SOAR), such as the numbers of created and enabled playbooks.
 *
 * @param request DescribePlaybookNumberMetricsRequest
 * @return DescribePlaybookNumberMetricsResponse
 */
async function describePlaybookNumberMetrics(request: DescribePlaybookNumberMetricsRequest): DescribePlaybookNumberMetricsResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookNumberMetricsWithOptions(request, runtime);
}

model DescribePlaybookReleasesRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  pageNumber?: int32(name='PageNumber', description='The page number. Default value: 1. Pages start from page 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10. If you do not specify the PageSize parameter, 10 entries are returned by default.

>  We recommend that you do not leave this parameter empty.', example='10'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxx'),
}

model DescribePlaybookReleasesResponseBody = {
  page?: {
    pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
    totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='100'),
  }(name='Page', description='The pagination information.'),
  records?: [ 
    {
      creator?: string(name='Creator', description='The ID of the Alibaba Cloud account that is used to publish the version.', example='145xxxx985'),
      description?: string(name='Description', description='The description of the layer version.', example='This is a new version'),
      gmtCreate?: long(name='GmtCreate', description='The time when the version was created. The value is a 13-digit timestamp.', example='1655277397000'),
      gmtModified?: long(name='GmtModified', description='The time when the version was modified. The value is a 13-digit timestamp.', example='1691460804000'),
      id?: int32(name='Id', description='The record ID.', example='80xxx'),
      taskflowMd5?: string(name='TaskflowMd5', description='The MD5 value configured for the published version of the playbook.', example='be0a4ef084dd174abe47xxxxx'),
    }
  ](name='Records', description='The information about the playbook version.'),
  requestId?: string(name='RequestId', description='The request ID.', example='3DFBE11C-6EB6-5166-92D6-3397796AFE1E'),
}

model DescribePlaybookReleasesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybookReleasesResponseBody(name='body'),
}

/**
 * @summary Queries the information about the published versions of a playbook.
 *
 * @param request DescribePlaybookReleasesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybookReleasesResponse
 */
async function describePlaybookReleasesWithOptions(request: DescribePlaybookReleasesRequest, runtime: $RuntimeOptions): DescribePlaybookReleasesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybookReleases',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the information about the published versions of a playbook.
 *
 * @param request DescribePlaybookReleasesRequest
 * @return DescribePlaybookReleasesResponse
 */
async function describePlaybookReleases(request: DescribePlaybookReleasesRequest): DescribePlaybookReleasesResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybookReleasesWithOptions(request, runtime);
}

model DescribePlaybooksRequest {
  active?: int32(name='Active', description='Activation status of the playbook. Values:

- **1**: Indicates the playbook is activated.
- **0**: Indicates the playbook is not activated.', example='1'),
  endMillis?: long(name='EndMillis', description='End time for the query, in 13-digit timestamp format.', example='1683858064361'),
  lang?: string(name='Lang', description='Specifies the language type for the request and response, default is **zh**. Values:
- **zh**: Chinese.
- **en**: English.', example='zh'),
  name?: string(name='Name', description='The name of the playbook.', example='demo_playbook'),
  order?: string(name='Order', description='The sorting logic, with a default value of **desc**. Values:
- **desc**: Descending order.
- **asc**: Ascending order.', example='desc'),
  ownType?: string(name='OwnType', description='Type of the playbook. Values:

- **preset**: Predefined playbook.
- **user**: Custom playbook.', example='user'),
  pageNumber?: long(name='PageNumber', description='Sets the page number from which to start displaying the query results. The default value is 1, indicating the first page.', example='1'),
  pageSize?: int32(name='PageSize', description='Specifies the maximum number of items to display per page in a paginated query. The default number of items per page is 20. If the PageSize parameter is empty, it will return 10 items by default.
> It is recommended that the PageSize value is not empty.', example='10'),
  paramTypes?: string(name='ParamTypes', description='The trigger method for the playbook, with a default value of **query all**. Values:
- **template-incident**: Security incident.
- **template-ip**: IP entity.
- **template-file**: File entity.
- **template-process**: Process entity.
- **template-alert**: Security alert.
- **template-domain**: Domain entity.
- **template-container**: Container entity.
- **template-host**: Host entity.
- **template-custom**: Custom.', example='template-alert'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.
> You can use the UUID to query specific playbook information.
> - Call the [DescribePlaybooks](~~DescribePlaybooks~~) API to obtain this parameter.', example='8baa6cff-319e-4ede-97bc-1xxxxxx'),
  playbookUuids?: string(name='PlaybookUuids', description='UUID List of the playbook.

Note You can use the UUID list to query specific playbook information.
Call the DescribePlaybooks API to obtain this parameter.', example='8baa6cff-319e-4ede-97bc-1xxxxxx,7745e6cff-319e-4ede-97bc-1xxxxxx'),
  sort?: string(name='Sort', description='The sorting basis, with a default value of **1**. Values:
- **1**: Last modified time.
- **2**: Most recent execution time.', example='1'),
  startMillis?: long(name='StartMillis', description='Start time for the query, in 13-digit timestamp format.', example='1683526277415'),
}

model DescribePlaybooksResponseBody = {
  page?: {
    pageNumber?: int32(name='PageNumber', description='The page number in pagination queries.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of items per page in pagination queries.', example='10'),
    totalCount?: int32(name='TotalCount', description='The total number of items found.', example='100'),
  }(name='Page', description='Pagination query information.'),
  playbooks?: [ 
    {
      active?: int32(name='Active', description='The status indicator of the playbook. Values:

- **1**: Indicates the playbook is activated.
- **0**: Indicates the playbook is deactivated.', example='1'),
      displayName?: string(name='DisplayName', description='The display name of the playbook.', example='demo_playbook'),
      gmtCreate?: long(name='GmtCreate', description='The creation time of the playbook, in 13-digit timestamp format.', example='1683526277415'),
      gmtModified?: string(name='GmtModified', description='The modification time of the playbook.', example='1681396398000'),
      lastRuntime?: long(name='LastRuntime', description='The last execution time of the playbook, in 13-digit timestamp format.', example='1683526277415'),
      ownType?: string(name='OwnType', description='The type of the playbook. Values:

- **preset**: Predefined playbook.
- **user**: Custom playbook.', example='user'),
      paramType?: string(name='ParamType', description='The trigger method for the playbook, with a default value of **query all**. Possible values are:
- **template-incident**: Security incident.
- **template-ip**: IP entity.
- **template-file**: File entity.
- **template-process**: Process entity.
- **template-alert**: Security alert.
- **template-domain**: Domain entity.
- **template-container**: Container entity.
- **template-host**: Host entity.', example='template-alert'),
      playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.', example='bb5a8640-a14f-44ef-8376-cxxxxx'),
    }
  ](name='Playbooks', description='List of playbooks.'),
  requestId?: string(name='RequestId', description='The ID of the current request, generated by Alibaba Cloud as a unique identifier for troubleshooting and problem localization.', example='138B5AB7-****-5814-87A3-E3E****F207E'),
}

model DescribePlaybooksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePlaybooksResponseBody(name='body'),
}

/**
 * @summary Retrieve the list of playbooks.
 *
 * @param request DescribePlaybooksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePlaybooksResponse
 */
async function describePlaybooksWithOptions(request: DescribePlaybooksRequest, runtime: $RuntimeOptions): DescribePlaybooksResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePlaybooks',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Retrieve the list of playbooks.
 *
 * @param request DescribePlaybooksRequest
 * @return DescribePlaybooksResponse
 */
async function describePlaybooks(request: DescribePlaybooksRequest): DescribePlaybooksResponse {
  var runtime = new $RuntimeOptions{};
  return describePlaybooksWithOptions(request, runtime);
}

model DescribePopApiRequest {
  apiName?: string(name='ApiName', description='The operation name of the Alibaba Cloud service.

This parameter is required.', example='DescribeInstanceInfo'),
  apiVersion?: string(name='ApiVersion', description='The version number of the API.

>  You can call the [DescribePopApiVersionList](~~DescribePopApiVersionList~~) operation to query the version number.

This parameter is required.', example='2021-10-01'),
  env?: string(name='Env', description='The environment in which the API operation parameter is used. Set the value to online.

This parameter is required.', example='online'),
  popCode?: string(name='PopCode', description='The POP code of the Alibaba Cloud service.

>  You can call the [DescribeApiList](~~DescribeApiList~~) operation to query the POP code.

This parameter is required.', example='Sas'),
}

model DescribePopApiResponseBody = {
  apiName?: string(name='ApiName', description='The name of the API.', example='AddAssetCleanConfig'),
  openApiMetaList?: [ 
    {
      description?: string(name='Description', description='The parameter description.', example='demo parameter'),
      exampleValue?: string(name='ExampleValue', description='The example value.', example='12.xx.xx.xx'),
      name?: string(name='Name', description='The parameter name.', example='DescribePopApi'),
      required?: boolean(name='Required', description='Indicates whether the parameter is required.

*   true
*   false', example='false'),
      type?: string(name='Type', description='The data type of the parameter field. Valid values:

*   **string**
*   **boolean**
*   **integer**
*   **long**', example='string'),
    }
  ](name='OpenApiMetaList', description='The information about the API.'),
  popCode?: string(name='PopCode', description='The POP code of the Alibaba Cloud service.', example='Sas'),
  requestId?: string(name='RequestId', description='The request ID.', example='1A01B0BA-CFC4-5813-9EB0-A5DA15FA95AE'),
  version?: string(name='Version', description='The version of the API.', example='2019-09-10'),
}

model DescribePopApiResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePopApiResponseBody(name='body'),
}

/**
 * @summary Queries the details of an API operation.
 *
 * @param request DescribePopApiRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePopApiResponse
 */
async function describePopApiWithOptions(request: DescribePopApiRequest, runtime: $RuntimeOptions): DescribePopApiResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePopApi',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the details of an API operation.
 *
 * @param request DescribePopApiRequest
 * @return DescribePopApiResponse
 */
async function describePopApi(request: DescribePopApiRequest): DescribePopApiResponse {
  var runtime = new $RuntimeOptions{};
  return describePopApiWithOptions(request, runtime);
}

model DescribePopApiItemListRequest {
  apiName?: string(name='ApiName', description='The API operation name of the Alibaba Cloud service. Fuzzy match is supported.', example='DescribePopApiItemList'),
  apiVersion?: string(name='ApiVersion', description='The version number of the API.

>  You can call the [DescribePopApiVersionList](~~DescribePopApiVersionList~~) operation to query the version number.

This parameter is required.', example='2018-12-03'),
  env?: string(name='Env', description='The environment in which the API operation parameters are used. Set the value to online.

This parameter is required.', example='online'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  popCode?: string(name='PopCode', description='The POP code of the Alibaba Cloud service.

>  You can call the [DescribeApiList](~~DescribeApiList~~) operation to query the POP code.

This parameter is required.', example='Sas'),
}

model DescribePopApiItemListResponseBody = {
  names?: [ string ](name='Names', description='The names of API operations.'),
  popCode?: string(name='PopCode', description='The POP code of the Alibaba Cloud service.', example='Sas'),
  requestId?: string(name='RequestId', description='The request ID.', example='6336D603-7028-52DE-AD88-E34AA5248355'),
  total?: long(name='Total', description='The total number of entries returned.', example='100'),
  version?: string(name='Version', description='The version number of the API for the Alibaba Cloud service.', example='2018-12-03'),
}

model DescribePopApiItemListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePopApiItemListResponseBody(name='body'),
}

/**
 * @summary Queries a list of API operations for an Alibaba Cloud service.
 *
 * @param request DescribePopApiItemListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePopApiItemListResponse
 */
async function describePopApiItemListWithOptions(request: DescribePopApiItemListRequest, runtime: $RuntimeOptions): DescribePopApiItemListResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePopApiItemList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries a list of API operations for an Alibaba Cloud service.
 *
 * @param request DescribePopApiItemListRequest
 * @return DescribePopApiItemListResponse
 */
async function describePopApiItemList(request: DescribePopApiItemListRequest): DescribePopApiItemListResponse {
  var runtime = new $RuntimeOptions{};
  return describePopApiItemListWithOptions(request, runtime);
}

model DescribeProcessStatisticsRequest {
  lang?: string(name='Lang', example='zh'),
  roleFor?: string(name='RoleFor', example='1709821xxxxx3093'),
  roleType?: string(name='RoleType', example='0'),
}

model DescribeProcessStatisticsResponseBody = {
  metrics?: {
    banFileNum?: int32(name='BanFileNum', example='1'),
    banIpNum?: int32(name='BanIpNum', example='1'),
    banProcessNum?: int32(name='BanProcessNum', example='1'),
    taskNum?: int32(name='TaskNum', example='1'),
  }(name='Metrics'),
  requestId?: string(name='RequestId', example='4CFC0F8A-D600-5FFF-A0DF-3121C4C1B90F'),
}

model DescribeProcessStatisticsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeProcessStatisticsResponseBody(name='body'),
}

/**
 * @summary 获取统计信息
 *
 * @param request DescribeProcessStatisticsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeProcessStatisticsResponse
 */
async function describeProcessStatisticsWithOptions(request: DescribeProcessStatisticsRequest, runtime: $RuntimeOptions): DescribeProcessStatisticsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeProcessStatistics',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取统计信息
 *
 * @param request DescribeProcessStatisticsRequest
 * @return DescribeProcessStatisticsResponse
 */
async function describeProcessStatistics(request: DescribeProcessStatisticsRequest): DescribeProcessStatisticsResponse {
  var runtime = new $RuntimeOptions{};
  return describeProcessStatisticsWithOptions(request, runtime);
}

model DescribeProcessTaskCountRequest {
  entityUuidList?: [ string ](name='EntityUuidList', description='Collection of entity UUIDs.

This parameter is required.'),
  lang?: string(name='Lang', description='Language type for request and response messages. Values:

- **zh** (default): Chinese.

- **en**: English.', example='zh'),
  roleFor?: long(name='RoleFor', description='User ID for administrators to switch to other member\\\\"s perspective.', example='104739******259'),
  roleType?: string(name='RoleType', description='View type.

- **0**: Current Alibaba Cloud account view.
- **1**: View for all accounts under the enterprise.', example='0'),
}

model DescribeProcessTaskCountResponseBody = {
  data?: [ 
    {
      count?: long(name='Count', description='Count.', example='67'),
      entityUuid?: string(name='EntityUuid', description='Entity UUID.', example='a680c9ae-****-4c39-****-0302****fc8e'),
    }
  ](name='Data', description='Transmitted data.'),
  requestId?: string(name='RequestId', description='The ID of this call request, which is a unique identifier generated by Alibaba Cloud for this request, used for troubleshooting and problem localization.', example='e866cce0-****-41de-817e-****8d5e2650'),
}

model DescribeProcessTaskCountResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeProcessTaskCountResponseBody(name='body'),
}

/**
 * @summary Query the number of associated disposal tasks based on the entity UUID.
 *
 * @param request DescribeProcessTaskCountRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeProcessTaskCountResponse
 */
async function describeProcessTaskCountWithOptions(request: DescribeProcessTaskCountRequest, runtime: $RuntimeOptions): DescribeProcessTaskCountResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeProcessTaskCount',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Query the number of associated disposal tasks based on the entity UUID.
 *
 * @param request DescribeProcessTaskCountRequest
 * @return DescribeProcessTaskCountResponse
 */
async function describeProcessTaskCount(request: DescribeProcessTaskCountRequest): DescribeProcessTaskCountResponse {
  var runtime = new $RuntimeOptions{};
  return describeProcessTaskCountWithOptions(request, runtime);
}

model DescribeProcessTasksRequest {
  direction?: string(name='Direction', description='The sort order. Valid values:

*   **desc** (default)
*   **asc**', example='desc'),
  entityName?: string(name='EntityName', description='The name of the handling entity.', example='127.0.0.1'),
  entityType?: string(name='EntityType', description='The type of the handling entity. Valid values:

*   **ip**
*   **file**
*   **process**', example='ip'),
  entityUuid?: string(name='EntityUuid'),
  eventUuid?: string(name='EventUuid'),
  orderField?: string(name='OrderField', description='The field that you use to sort the result.

>  You can obtain the field from the response result.', example='gmtCreate'),
  pageNumber?: long(name='PageNumber', description='The page number. Default value: 1. Pages start from page 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10. If you do not specify the PageSize parameter, 10 entries are returned by default.

>  We recommend that you do not leave this parameter empty.', example='10'),
  paramContent?: string(name='ParamContent', description='The handling entity, handling scenario, or handling parameter that is used for fuzzy match.', example='12.x.x.x'),
  processActionEnd?: long(name='ProcessActionEnd', description='The end of the time range for a handling task. The value is a 13-digit timestamp.', example='1700031183572'),
  processActionStart?: long(name='ProcessActionStart', description='The beginning of the time range for a handling task. The value is a 13-digit timestamp.', example='1700031183572'),
  processRemoveEnd?: long(name='ProcessRemoveEnd', description='The end of the time range for an unblocking task. The value is a 13-digit timestamp.', example='1700031183572'),
  processRemoveStart?: long(name='ProcessRemoveStart', description='The beginning of the time range for an unblocking task. The value is a 13-digit timestamp.', example='1700031183572'),
  processStrategyUuid?: string(name='ProcessStrategyUuid', description='The UUID of the handling policy.

>  You can call the [ListDisposeStrategy](https://help.aliyun.com/document_detail/2584440.html) operation to query the UUID of the handling policy.', example='92af3c79-1754-4646-9366-9ddbd1e45536_xxxx'),
  sceneCode?: string(name='SceneCode', description='The scenario code of the handling task.

>  You can call the [DescribeEnumItems](~~DescribeEnumItems~~) operation to query the scenario code of the handling task. This parameter is available when you set **EnumType** to **process**.', example='event_xxx_whole_process'),
  scope?: string(name='Scope', description='The ID of the Alibaba Cloud account that is specified in the handling task.', example='125xxxxx9870'),
  source?: string(name='Source', description='The triggering source of the handling task. The value is a string array. Valid values:

*   **system**: triggered when you manually handle an event
*   **custom**: triggered by an event based on an automatic response rule
*   **custom_alert**: triggered by an alert based on an automatic response rule
*   **soar-manual**: triggered when you use SOAR to manually run a playbook
*   **soar-mdr**: triggered by Managed Security Service', example='["system"]'),
  taskId?: string(name='TaskId', description='The unique identifier of the handling task.

>  This parameter is used to query a specific task. You can obtain the value from the response result.', example='150xxxxxxxxx95066'),
  taskStatus?: string(name='TaskStatus', description='The status of the handling task. The value is a string. Valid values:

*   **11**: being handled
*   **21**: being blocked
*   **22**: being quarantined
*   **23**: completed
*   **24**: added to the whitelist
*   **20**: successful
*   **90**: failed
*   **91**: unblocking failed
*   **92**: restoring quarantined files failed', example='["11","21"]'),
  triggerSource?: string(name='TriggerSource'),
  yunCode?: string(name='YunCode', description='The cloud service that is associated with the handling task. The value is a string. Valid values:

*   **WAF**: Web Application Firewall (WAF)
*   **CFW**: Cloud Firewall
*   **Aegis**: Security Center', example='["WAF"]'),
}

model DescribeProcessTasksResponseBody = {
  page?: {
    pageNumber?: int32(name='PageNumber', description='The page number.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of entries per page.', example='10'),
    totalCount?: int32(name='TotalCount', description='The total number of entries returned.', example='30'),
  }(name='Page', description='The pagination information.'),
  processTasks?: [ 
    {
      creator?: string(name='Creator', description='The ID of the Alibaba Cloud account that is used to submit the handling task.', example='123xxxx355'),
      entityName?: string(name='EntityName', description='The name of the handling entity.', example='1.1.1.x'),
      entityType?: string(name='EntityType', description='The type of the handling entity.', example='ip'),
      entityUuid?: string(name='EntityUuid'),
      errCode?: string(name='ErrCode', description='The error code returned if the call failed.', example='sts_openapi.Info.DefenseSceneNotSupported'),
      errMsg?: string(name='ErrMsg', description='The error message returned if the call failed.', example='ParamError : The parameters of your request are invalid'),
      errTip?: string(name='ErrTip', description='The error tip returned if the call failed.', example='Verify that the input parameters of the components are correct'),
      eventUuid?: string(name='EventUuid'),
      gmtCreateMillis?: long(name='GmtCreateMillis', description='The creation time of the handling task. The value is a 13-digit timestamp.', example='1700031183572'),
      gmtModifiedMillis?: long(name='GmtModifiedMillis', description='The modification time of the handling task. The value is a 13-digit timestamp.', example='1700031183572'),
      inputParams?: string(name='InputParams', description='The input parameter of the handling task.', example='{"groupuuid":"c6a9b1df-f4ac-4078-bef4-99xxxxxx"}'),
      processStrategyUuid?: string(name='ProcessStrategyUuid', description='The ID of the associated policy.', example='92af3c79-1754-4646-9366-9ddbd1e45536_xxxx'),
      processTime?: long(name='ProcessTime', description='The delivery time of the handling task. The value is a 13-digit timestamp.', example='1700031183572'),
      removeTime?: long(name='RemoveTime', description='The unblocking time of the handling task. The value is a 13-digit timestamp.', example='1700031183572'),
      reqUuid?: string(name='ReqUuid'),
      sceneCode?: string(name='SceneCode', description='The scenario code of the handling task.', example='event_xxx_whole_process'),
      sceneName?: string(name='SceneName', description='The scenario name of the handling task.', example='waf_whole_process'),
      scope?: string(name='Scope', description='The ID of the Alibaba Cloud account that is specified in the handling task.', example='123xxxxx234'),
      source?: string(name='Source', description='The submission source of the handling task.', example='system'),
      taskId?: string(name='TaskId', description='The unique identifier of the handling task.', example='150xxxxxxxxx95066'),
      taskStatus?: int32(name='TaskStatus', description='The status of the handling task.', example='11'),
      triggerSource?: string(name='TriggerSource'),
      yunCode?: string(name='YunCode', description='The code of the cloud service that is associated with the handling task.', example='WAF'),
    }
  ](name='ProcessTasks', description='The handling tasks.'),
  requestId?: string(name='RequestId', description='The request ID.', example='E7698CFB-4E1C-5840-8EC9-691B86729E94'),
}

model DescribeProcessTasksResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeProcessTasksResponseBody(name='body'),
}

/**
 * @summary Queries the information about handling tasks. When you use Security Orchestration Automation Response (SOAR) to handle events, handling tasks are generated in the handling center.
 *
 * @param request DescribeProcessTasksRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeProcessTasksResponse
 */
async function describeProcessTasksWithOptions(request: DescribeProcessTasksRequest, runtime: $RuntimeOptions): DescribeProcessTasksResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.direction)) {
    query['Direction'] = request.direction;
  }
  if (!$isNull(request.entityName)) {
    query['EntityName'] = request.entityName;
  }
  if (!$isNull(request.entityType)) {
    query['EntityType'] = request.entityType;
  }
  if (!$isNull(request.entityUuid)) {
    query['EntityUuid'] = request.entityUuid;
  }
  if (!$isNull(request.eventUuid)) {
    query['EventUuid'] = request.eventUuid;
  }
  if (!$isNull(request.orderField)) {
    query['OrderField'] = request.orderField;
  }
  if (!$isNull(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.paramContent)) {
    query['ParamContent'] = request.paramContent;
  }
  if (!$isNull(request.processActionEnd)) {
    query['ProcessActionEnd'] = request.processActionEnd;
  }
  if (!$isNull(request.processActionStart)) {
    query['ProcessActionStart'] = request.processActionStart;
  }
  if (!$isNull(request.processRemoveEnd)) {
    query['ProcessRemoveEnd'] = request.processRemoveEnd;
  }
  if (!$isNull(request.processRemoveStart)) {
    query['ProcessRemoveStart'] = request.processRemoveStart;
  }
  if (!$isNull(request.processStrategyUuid)) {
    query['ProcessStrategyUuid'] = request.processStrategyUuid;
  }
  if (!$isNull(request.sceneCode)) {
    query['SceneCode'] = request.sceneCode;
  }
  if (!$isNull(request.scope)) {
    query['Scope'] = request.scope;
  }
  if (!$isNull(request.source)) {
    query['Source'] = request.source;
  }
  if (!$isNull(request.taskId)) {
    query['TaskId'] = request.taskId;
  }
  if (!$isNull(request.taskStatus)) {
    query['TaskStatus'] = request.taskStatus;
  }
  if (!$isNull(request.triggerSource)) {
    query['TriggerSource'] = request.triggerSource;
  }
  if (!$isNull(request.yunCode)) {
    query['YunCode'] = request.yunCode;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeProcessTasks',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the information about handling tasks. When you use Security Orchestration Automation Response (SOAR) to handle events, handling tasks are generated in the handling center.
 *
 * @param request DescribeProcessTasksRequest
 * @return DescribeProcessTasksResponse
 */
async function describeProcessTasks(request: DescribeProcessTasksRequest): DescribeProcessTasksResponse {
  var runtime = new $RuntimeOptions{};
  return describeProcessTasksWithOptions(request, runtime);
}

model DescribeSoarRecordActionOutputListRequest {
  actionUuid?: string(name='ActionUuid', description='The UUID of the component action.

>  You can call the [DescribeSoarTaskAndActions](~~DescribeSoarTaskAndActions~~) operation to query the UUID.

This parameter is required.', example='2202c90d-fa93-4726-bc32-xxxxxx'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  pageNumber?: int32(name='PageNumber', description='The page number. Default value: 1. Pages start from page 1.

This parameter is required.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10. If you leave this parameter empty, 10 entries are returned on each page.

>  We recommend that you do not leave this parameter empty.

This parameter is required.', example='10'),
}

model DescribeSoarRecordActionOutputListResponseBody = {
  actionOutputs?: string(name='ActionOutputs', description='The data that is returned when the component action is performed. The value is a JSON array.

>  The format of the output data is determined by the component that is configured when the playbook is written.', example='[
    {
        "a": "a",
        "taskname": "92af3c79-1754-4646-9366-9ddbd1e45536_xxxx",
        "log_time": 1699868849000
    }
]'),
  pageNumber?: int32(name='PageNumber', description='The page number. Default value: 1.', example='1'),
  pageSize?: int32(name='PageSize', description='The number of entries per page. Default value: 10.', example='10'),
  requestId?: string(name='RequestId', description='The request ID.', example='6A2BF9CF-3E32-5E45-A79B-8F67E0A4FE90'),
  totalCount?: int32(name='TotalCount', description='The total number of pages returned.', example='100'),
}

model DescribeSoarRecordActionOutputListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSoarRecordActionOutputListResponseBody(name='body'),
}

/**
 * @summary Queries the data that is returned when a component initiates an action in a playbook task.
 *
 * @param request DescribeSoarRecordActionOutputListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSoarRecordActionOutputListResponse
 */
async function describeSoarRecordActionOutputListWithOptions(request: DescribeSoarRecordActionOutputListRequest, runtime: $RuntimeOptions): DescribeSoarRecordActionOutputListResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSoarRecordActionOutputList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the data that is returned when a component initiates an action in a playbook task.
 *
 * @param request DescribeSoarRecordActionOutputListRequest
 * @return DescribeSoarRecordActionOutputListResponse
 */
async function describeSoarRecordActionOutputList(request: DescribeSoarRecordActionOutputListRequest): DescribeSoarRecordActionOutputListResponse {
  var runtime = new $RuntimeOptions{};
  return describeSoarRecordActionOutputListWithOptions(request, runtime);
}

model DescribeSoarRecordInOutputRequest {
  actionUuid?: string(name='ActionUuid', description='The UUID of the component action.

>  You can call the [DescribeSoarTaskAndActions](~~DescribeSoarTaskAndActions~~) operation to query the UUIDs of component actions.

This parameter is required.', example='0531ff66-dd05-4f24-84bf-xxxxxxxx'),
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
}

model DescribeSoarRecordInOutputResponseBody = {
  inOutputInfo?: string(name='InOutputInfo', description='The execution result of the component action.', example='{
    "actionUuid": "3896a25d-4967-493c-942e-4e60f27da1f7-xxxxx",
    "outputSummary": {
        "datalist": [
            {
                "a": "a"
            }
        ],
        "total_data_successful": 1,
        "total_data": 1,
        "total_exe_successful": 1,
        "total_exe": 1,
        "total_data_with_dup": 1,
        "status": true
    },
    "outputSchema": {
        "a": "String",
        "startTime": "DateTime"
    },
    "inputParams": {
        "inputData": [
            {
                "outputFields": {
                    "a": "a"
                }
            }
        ],
        "totalSize": 1
    },
    "startTime": "2023-11-13 17:47:28.645",
    "taskName": "92af3c79-1754-4646-9366-9ddbxxxxx"
}'),
  requestId?: string(name='RequestId', description='The request ID.', example='372D8B41-AF8D-573A-9B3F-0924950F241F'),
}

model DescribeSoarRecordInOutputResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSoarRecordInOutputResponseBody(name='body'),
}

/**
 * @summary Queries the input and output data of a component action. You can call this operation after a playbook is run.
 *
 * @param request DescribeSoarRecordInOutputRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSoarRecordInOutputResponse
 */
async function describeSoarRecordInOutputWithOptions(request: DescribeSoarRecordInOutputRequest, runtime: $RuntimeOptions): DescribeSoarRecordInOutputResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSoarRecordInOutput',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the input and output data of a component action. You can call this operation after a playbook is run.
 *
 * @param request DescribeSoarRecordInOutputRequest
 * @return DescribeSoarRecordInOutputResponse
 */
async function describeSoarRecordInOutput(request: DescribeSoarRecordInOutputRequest): DescribeSoarRecordInOutputResponse {
  var runtime = new $RuntimeOptions{};
  return describeSoarRecordInOutputWithOptions(request, runtime);
}

model DescribeSoarRecordsRequest {
  endMillis?: long(name='EndMillis', description='The end time of the task execution, in 13-digit timestamp format.', example='1683772744953'),
  lang?: string(name='Lang', description='Set the language type for requests and received messages. The default is **zh**. Values:
- **zh**: Chinese
- **en**: English', example='zh'),
  pageNumber?: int32(name='PageNumber', description='Set which page to start displaying the query results from. The default value is 1, indicating the first page.', example='1'),
  pageSize?: int32(name='PageSize', description='Specify the maximum number of data entries per page when performing a paginated query. The default number of entries per page is 20. If the PageSize parameter is empty, it will return 10 entries by default.
> It is recommended not to leave the PageSize value empty.', example='10'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.
> You can obtain this parameter by calling the [DescribePlaybooks](~~DescribePlaybooks~~) interface.

This parameter is required.', example='8f55e76d-b5d5-4720-9cd7-xxxxx'),
  requestUuid?: string(name='RequestUuid', description='UUID of the playbook task execution.
> You can obtain this parameter by calling the [DescribeSoarRecords](https://help.aliyun.com/document_detail/2627455.html) interface.', example='6d412cfa-0905-4567-8a83-xxxxxx'),
  startMillis?: long(name='StartMillis', description='The start time of the task execution, in 13-digit timestamp format.', example='1683526284584'),
  taskStatus?: string(name='TaskStatus', description='The status of the task execution. Values:

- **success**: Successful task.
- **failed**: Failed task.
- **inprogress**: Task in progress', example='inprogress'),
  taskflowMd5?: string(name='TaskflowMd5', description='The MD5 value of the playbook configuration.', example='be0a4ef084dd174abe478df52xxxxx'),
  triggerUser?: string(name='TriggerUser', description='The Alibaba Cloud account ID that executed the playbook task.', example='127xxxx4392'),
}

model DescribeSoarRecordsResponseBody = {
  page?: {
    pageNumber?: int32(name='PageNumber', description='The current page number in paginated queries.', example='1'),
    pageSize?: int32(name='PageSize', description='The number of items per page in paginated queries.', example='10'),
    totalCount?: int32(name='TotalCount', description='The total number of queried items.', example='22'),
  }(name='Page', description='Information displayed on the page.

This parameter is required.'),
  requestId?: string(name='RequestId', description='The ID of the current request, generated by Alibaba Cloud as a unique identifier for the request, which can be used for troubleshooting and problem localization.', example='601C2DAC-6A67-5237-BEE8-5BF1CEE96296'),
  soarExecuteRecords?: [ 
    {
      endTime?: long(name='EndTime', description='The end time of the component execution, in 13-digit timestamp format.', example='1686294686000'),
      errorMsg?: string(name='ErrorMsg', description='The error message of the playbook task. This field is empty when the task succeeds.', example='stime not match'),
      rawEventReq?: string(name='RawEventReq', description='The request parameters of the playbook task.', example='{
    "input1": "xx.xx.xx.xx",
    "input2": "7d"
}'),
      requestUuid?: string(name='RequestUuid', description='The request ID of the playbook task, a unique ID for each task run.', example='ba1ec480-aa90-4bb6-a1a7-9e311ae79321'),
      resultMessage?: string(name='ResultMessage', description='The return information of the playbook, defined by the user within the playbook.', example='Playbook finish'),
      startTime?: long(name='StartTime', description='The start time of the task execution, in 13-digit timestamp format.', example='1675823338433'),
      status?: string(name='Status', description='The status of the playbook task. Values:

- **success**: Indicates successful execution.
- **fail**: Indicates failed execution.
- **running**: Indicates the task is running', example='success'),
      taskName?: string(name='TaskName', description='The name of the playbook task, which is the same as the playbook\\\\"s UUID.', example='82848ebc-eaff-4791-acd4-xxxxx'),
      taskType?: string(name='TaskType', description='The type of the playbook task, with values:

- **general**: Represents a general playbook task.
- **standard**: Represents a component execution task.', example='standard'),
      taskflowMd5?: string(name='TaskflowMd5', description='The MD5 value of the playbook configuration.', example='dea65a3db87fb9bd84bbxxxxx'),
      triggerType?: string(name='TriggerType', description='The type of the playbook task. Values:

- **debug**: Indicates a debugging task.
- **manual**: Indicates a manual task.
- **siem**: Indicates a task triggered by an event or alert.', example='debug'),
      triggerUser?: string(name='TriggerUser', description='The Alibaba Cloud account ID that executes the playbook task.', example='127xxxx4392'),
    }
  ](name='SoarExecuteRecords', description='Execution record result set.'),
}

model DescribeSoarRecordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSoarRecordsResponseBody(name='body'),
}

/**
 * @summary Get the execution records of a playbook.
 *
 * @param request DescribeSoarRecordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSoarRecordsResponse
 */
async function describeSoarRecordsWithOptions(request: DescribeSoarRecordsRequest, runtime: $RuntimeOptions): DescribeSoarRecordsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSoarRecords',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Get the execution records of a playbook.
 *
 * @param request DescribeSoarRecordsRequest
 * @return DescribeSoarRecordsResponse
 */
async function describeSoarRecords(request: DescribeSoarRecordsRequest): DescribeSoarRecordsResponse {
  var runtime = new $RuntimeOptions{};
  return describeSoarRecordsWithOptions(request, runtime);
}

model DescribeSoarTaskAndActionsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response.

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  requestUuid?: string(name='RequestUuid', description='The playbook UUID.', example='1077f2f9-25e8-42d9-bfdf-1528e1313f6d'),
}

model DescribeSoarTaskAndActionsResponseBody = {
  details?: {
    actions?: [ 
      {
        action?: string(name='Action', description='The action name of the component.', example='formatdata'),
        actionUuid?: string(name='ActionUuid', description='The UUID of the component execution record.', example='091be399-a937-4276-af78-xxxxxxxx'),
        assetName?: string(name='AssetName', description='The name of the asset that is used by the component.', example='SLS Asset'),
        component?: string(name='Component', description='The component name.', example='DataFormat'),
        endTime?: long(name='EndTime', description='The end of the time range during which the component is run. The value is a 13-digit timestamp.', example='1699868848766'),
        nodeName?: string(name='NodeName', description='The custom name of the node in the component.', example='DataFormat_1'),
        requestUuid?: string(name='RequestUuid', description='The request ID of the task. The value is unique.', example='8dac16c6-7411-4116-8d70-xxxxxxx'),
        startTime?: long(name='StartTime', description='The beginning of the time range during which the component is run. The value is a 13-digit timestamp.', example='1699868848731'),
        status?: string(name='Status', description='The running result of the component. Valid values:

*   **success**
*   **fail**', example='success'),
        taskName?: string(name='TaskName', description='The name of the task. The value is the same as the playbook UUID.', example='ed127287-6699-4e4d-b986-xxxxxxx'),
        taskStatus?: string(name='TaskStatus', description='The status of the triggered component action.

>  This parameter is disabled and left empty.', example='NULL'),
        triggerUser?: string(name='TriggerUser', description='The ID of the Alibaba Cloud account that is used to execute the task.', example='127xxxx4392'),
      }
    ](name='Actions', description='The list of component actions during the running of the playbook.'),
    endTime?: long(name='EndTime', description='The end of the time range during which the playbook is run. The value is a 13-digit timestamp.', example='1699868848767'),
    errorMsg?: string(name='ErrorMsg', description='The error message of the task. If the task is successful, this field is empty.', example='stime not match'),
    rawEventReq?: string(name='RawEventReq', description='The request parameters of the task.', example='{
    "input1": "xx.xx.xx.xx",
    "input2": "7d"
}'),
    requestUuid?: string(name='RequestUuid', description='The request ID of the task. The value is unique.', example='17f75844-75cc-4174-86da-cec07a690142'),
    resultLevel?: string(name='ResultLevel', description='The flag of the task. For debugging tasks, the value is **DEBUG**. For other tasks, the parameter is left empty.', example='DEBUG'),
    resultMessage?: string(name='ResultMessage', description='The returned information about the playbook. You can define the value in the playbook.', example='deubug playbook finished'),
    startTime?: long(name='StartTime', description='The beginning of the time range during which the playbook is run. The value is a 13-digit timestamp.', example='1699868848645'),
    status?: string(name='Status', description='The task status. Valid values:

*   **success**
*   **fail**
*   **running**', example='success'),
    taskFlowMd5?: string(name='TaskFlowMd5', description='The MD5 value of the playbook.', example='ed127287-6699-4e4d-b986-9f770879xxx'),
    taskName?: string(name='TaskName', description='The name of the task. The value is the same as the playbook UUID.', example='92af3c79-1754-4646-9366-9ddbd1e45536'),
    taskTenantId?: string(name='TaskTenantId', description='The ID of the Alibaba Cloud account to which the task belongs.', example='127xxxx4392'),
    triggerType?: string(name='TriggerType', description='The task type. Valid values:

*   **debug**: a debugging task
*   **manual**: a manual task
*   **siem**: an event-triggered task', example='siem'),
    triggerUser?: string(name='TriggerUser', description='The ID of the Alibaba Cloud account that triggers the task.', example='127xxxx4392'),
  }(name='Details', description='The execution details of each task.'),
  requestId?: string(name='RequestId', description='The request ID.', example='18017A93-3D5D-503A-8308-914543F1CBA3'),
}

model DescribeSoarTaskAndActionsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSoarTaskAndActionsResponseBody(name='body'),
}

/**
 * @summary Queries the execution records of a component during the running of a playbook.
 *
 * @param request DescribeSoarTaskAndActionsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSoarTaskAndActionsResponse
 */
async function describeSoarTaskAndActionsWithOptions(request: DescribeSoarTaskAndActionsRequest, runtime: $RuntimeOptions): DescribeSoarTaskAndActionsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSoarTaskAndActions',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the execution records of a component during the running of a playbook.
 *
 * @param request DescribeSoarTaskAndActionsRequest
 * @return DescribeSoarTaskAndActionsResponse
 */
async function describeSoarTaskAndActions(request: DescribeSoarTaskAndActionsRequest): DescribeSoarTaskAndActionsResponse {
  var runtime = new $RuntimeOptions{};
  return describeSoarTaskAndActionsWithOptions(request, runtime);
}

model DescribeSophonCommandsRequest {
  name?: string(name='Name', description='The name of the command. Fuzzy match is supported.', example='waf_process'),
}

model DescribeSophonCommandsResponseBody = {
  data?: [ 
    {
      description?: string(name='Description', description='The description of the command.', example='This is a action of processing for WAF'),
      displayName?: string(name='DisplayName', description='The display name of the command.', example='WAF Process IP'),
      name?: string(name='Name', description='The name of the command.', example='waf_process_ip_v2'),
      paramConfig?: [ 
        {
          checkField?: string(name='CheckField', description='The regular expression that is used to check the format of the parameter value. If the parameter is left empty, the check is not performed.', example='[0-9]{4}\\\\.[0-9]{4}\\\\.[0-9]{4}\\\\.[0-9]{4}'),
          field?: string(name='Field', description='The name of the parameter.', example='ip'),
          necessary?: boolean(name='Necessary', description='Indicates whether the parameter is required. Valid values:

*   **true** (default)
*   **false**', example='true'),
          value?: string(name='Value', description='The value of the parameter.', example='12.xx.xx.xx'),
        }
      ](name='ParamConfig', description='The parameter configurations.'),
    }
  ](name='Data', description='The commands.'),
  requestId?: string(name='RequestId', description='The request ID.', example='1E1EC464-3BD7-518F-9937-BCC12E6855FE'),
}

model DescribeSophonCommandsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeSophonCommandsResponseBody(name='body'),
}

/**
 * @summary Queries the commands that can be run to obtain objects.
 *
 * @param request DescribeSophonCommandsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeSophonCommandsResponse
 */
async function describeSophonCommandsWithOptions(request: DescribeSophonCommandsRequest, runtime: $RuntimeOptions): DescribeSophonCommandsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeSophonCommands',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the commands that can be run to obtain objects.
 *
 * @param request DescribeSophonCommandsRequest
 * @return DescribeSophonCommandsResponse
 */
async function describeSophonCommands(request: DescribeSophonCommandsRequest): DescribeSophonCommandsResponse {
  var runtime = new $RuntimeOptions{};
  return describeSophonCommandsWithOptions(request, runtime);
}

model DescribeVendorApiListRequest {
  apiName?: string(name='ApiName', example='AddAssetCleanConfig'),
  keyWord?: string(name='KeyWord', example='Create'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  productCode?: string(name='ProductCode', example='waf'),
  vendorCode?: string(name='VendorCode', example='Azure'),
}

model DescribeVendorApiListResponseBody = {
  apiList?: [ 
    {
      advanceConfig?: string(name='AdvanceConfig', example='{
    "cmd": "DescribeAclApiDispatch"
}'),
      apiName?: string(name='ApiName', example='VerifyMobile'),
      apiVersion?: string(name='ApiVersion', example='2017-08-01'),
      method?: string(name='Method', example='POST'),
      needAdvanceConfig?: boolean(name='NeedAdvanceConfig', example='true'),
      needPageInfo?: boolean(name='NeedPageInfo', example='false'),
      pageInfo?: string(name='PageInfo', example='{\\\\"Count\\\\": 10, \\\\"TotalCount\\\\": 23, \\\\"PageSize\\\\": 10, \\\\"CurrentPage\\\\": 1}'),
      parameter?: string(name='Parameter', example='[
    {
        "name": "Domain",
        "type": "String",
        "isRequired": true,
        "exampleValue": "www.***.com",
        "description": "www.***.com"
    }
]'),
      productCode?: string(name='ProductCode', example='cfw'),
      productDomain?: string(name='ProductDomain', example='cfw.xxx.com'),
      productName?: string(name='ProductName', example='waf'),
      protocol?: string(name='Protocol', example='https'),
      vendorCode?: string(name='VendorCode', example='Azure'),
    }
  ](name='ApiList'),
  page?: {
    pageNumber?: long(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: long(name='TotalCount', example='100'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='E7698CFB-****-5840-8EC9-691B86729E94'),
}

model DescribeVendorApiListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVendorApiListResponseBody(name='body'),
}

/**
 * @summary 查询云厂商OpenApi列表
 *
 * @param request DescribeVendorApiListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVendorApiListResponse
 */
async function describeVendorApiListWithOptions(request: DescribeVendorApiListRequest, runtime: $RuntimeOptions): DescribeVendorApiListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.apiName)) {
    query['ApiName'] = request.apiName;
  }
  if (!$isNull(request.keyWord)) {
    query['KeyWord'] = request.keyWord;
  }
  if (!$isNull(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.productCode)) {
    query['ProductCode'] = request.productCode;
  }
  if (!$isNull(request.vendorCode)) {
    query['VendorCode'] = request.vendorCode;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVendorApiList',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询云厂商OpenApi列表
 *
 * @param request DescribeVendorApiListRequest
 * @return DescribeVendorApiListResponse
 */
async function describeVendorApiList(request: DescribeVendorApiListRequest): DescribeVendorApiListResponse {
  var runtime = new $RuntimeOptions{};
  return describeVendorApiListWithOptions(request, runtime);
}

model DescriberPython3ScriptLogsRequest {
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  requestUuid?: string(name='RequestUuid', description='The UUID that is returned when the Python3 script is run.

>  You can call the [RunPython3Script](~~RunPython3Script~~) operation to query the UUID.

This parameter is required.', example='69edc2b4-c95c-424f-9114-xxxxxxx'),
}

model DescriberPython3ScriptLogsResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='D22D8A0C-6E86-57B2-A142-929184122AB1'),
  runResult?: string(name='RunResult', description='The operational logs of the Python3 script.', example='{
    "logs": [
        {
            "message": "function input is {}"
        }
    ]
}'),
}

model DescriberPython3ScriptLogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescriberPython3ScriptLogsResponseBody(name='body'),
}

/**
 * @summary Queries the operational logs of a Python3 script by using the UUID that is returned when the script is run. The UUID is specified by requestUuid.
 *
 * @param request DescriberPython3ScriptLogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescriberPython3ScriptLogsResponse
 */
async function describerPython3ScriptLogsWithOptions(request: DescriberPython3ScriptLogsRequest, runtime: $RuntimeOptions): DescriberPython3ScriptLogsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescriberPython3ScriptLogs',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries the operational logs of a Python3 script by using the UUID that is returned when the script is run. The UUID is specified by requestUuid.
 *
 * @param request DescriberPython3ScriptLogsRequest
 * @return DescriberPython3ScriptLogsResponse
 */
async function describerPython3ScriptLogs(request: DescriberPython3ScriptLogsRequest): DescriberPython3ScriptLogsResponse {
  var runtime = new $RuntimeOptions{};
  return describerPython3ScriptLogsWithOptions(request, runtime);
}

model ModifyComponentAssetRequest {
  assetConfig?: string(name='AssetConfig', description='The configuration of the asset. The value is a JSON object.

This parameter is required.', example='{
    "name": "test asset",
    "componentName": "SLS",
    "params": [
        {
            "name": "end_point",
            "value": "xxx"
        },
        {
            "name": "sub_id",
            "value": "xxxx"
        },
        {
            "name": "access_key",
            "value": "xxxx"
        }
    ]
}'),
  lang?: string(name='Lang', description='The language of the content within the request and response.

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
}

model ModifyComponentAssetResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='1C5F11E9-464E-51F0-9296-43BB312A0557'),
}

model ModifyComponentAssetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyComponentAssetResponseBody(name='body'),
}

/**
 * @summary Modifies the information about the asset that is configured for a component.
 *
 * @param request ModifyComponentAssetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyComponentAssetResponse
 */
async function modifyComponentAssetWithOptions(request: ModifyComponentAssetRequest, runtime: $RuntimeOptions): ModifyComponentAssetResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.assetConfig)) {
    query['AssetConfig'] = request.assetConfig;
  }
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyComponentAsset',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the information about the asset that is configured for a component.
 *
 * @param request ModifyComponentAssetRequest
 * @return ModifyComponentAssetResponse
 */
async function modifyComponentAsset(request: ModifyComponentAssetRequest): ModifyComponentAssetResponse {
  var runtime = new $RuntimeOptions{};
  return modifyComponentAssetWithOptions(request, runtime);
}

model ModifyPlaybookRequest {
  description?: string(name='Description', description='The description of the playbook.', example='demo test task'),
  displayName?: string(name='DisplayName', description='The display name of the playbook.

This parameter is required.', example='aliyun_waf_test_playbook'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='8baa6cff-319e-4ede-97bc-1586c35e61f8'),
  taskflow?: string(name='Taskflow', description='The XML configuration of the playbook.', example='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>'),
}

model ModifyPlaybookResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='9B584F84-D66A-5525-8E7B-05612A903ABF'),
}

model ModifyPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPlaybookResponseBody(name='body'),
}

/**
 * @summary Modifies the configuration of a playbook.
 *
 * @param request ModifyPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPlaybookResponse
 */
async function modifyPlaybookWithOptions(request: ModifyPlaybookRequest, runtime: $RuntimeOptions): ModifyPlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.displayName)) {
    body['DisplayName'] = request.displayName;
  }
  if (!$isNull(request.lang)) {
    body['Lang'] = request.lang;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.taskflow)) {
    body['Taskflow'] = request.taskflow;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the configuration of a playbook.
 *
 * @param request ModifyPlaybookRequest
 * @return ModifyPlaybookResponse
 */
async function modifyPlaybook(request: ModifyPlaybookRequest): ModifyPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return modifyPlaybookWithOptions(request, runtime);
}

model ModifyPlaybookInputOutputRequest {
  exeConfig?: string(name='ExeConfig', description='The executed mode of a playbook. The value is a JSON array.'),
  inputParams?: string(name='InputParams', description='The configuration of the input parameters. The value is a JSON array.

This parameter is required.', example='[
    {
        "typeName": "String",
        "dataClass": "normal",
        "dataType": "String",
        "description": "period",
        "example": "",
        "name": "period",
        "required": false
    }
]'),
  lang?: string(name='Lang', description='The language of the content within the request and response.

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
  outputParams?: string(name='OutputParams', description='The configuration of the output parameters. This parameter is unavailable. Leave it empty.

This parameter is required.', example='[]'),
  paramType?: string(name='ParamType', description='The input parameter type.

*   **template-ip**
*   **template-file**
*   **template-process**
*   **custom**', example='custom'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='8baa6cff-319e-4ede-97bc-xxxxxxx'),
}

model ModifyPlaybookInputOutputResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='8DDC07CE-D41B-5142-8D91-469462719C77'),
}

model ModifyPlaybookInputOutputResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPlaybookInputOutputResponseBody(name='body'),
}

/**
 * @summary Modifies the input and output parameters of a playbook.
 *
 * @param request ModifyPlaybookInputOutputRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPlaybookInputOutputResponse
 */
async function modifyPlaybookInputOutputWithOptions(request: ModifyPlaybookInputOutputRequest, runtime: $RuntimeOptions): ModifyPlaybookInputOutputResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.exeConfig)) {
    body['ExeConfig'] = request.exeConfig;
  }
  if (!$isNull(request.inputParams)) {
    body['InputParams'] = request.inputParams;
  }
  if (!$isNull(request.lang)) {
    body['Lang'] = request.lang;
  }
  if (!$isNull(request.outputParams)) {
    body['OutputParams'] = request.outputParams;
  }
  if (!$isNull(request.paramType)) {
    body['ParamType'] = request.paramType;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyPlaybookInputOutput',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the input and output parameters of a playbook.
 *
 * @param request ModifyPlaybookInputOutputRequest
 * @return ModifyPlaybookInputOutputResponse
 */
async function modifyPlaybookInputOutput(request: ModifyPlaybookInputOutputRequest): ModifyPlaybookInputOutputResponse {
  var runtime = new $RuntimeOptions{};
  return modifyPlaybookInputOutputWithOptions(request, runtime);
}

model ModifyPlaybookInstanceStatusRequest {
  active?: int32(name='Active', description='The playbook status. Valid values:

*   **1**: starts the playbook.
*   **0**: stops the playbook.

This parameter is required.', example='1'),
  lang?: string(name='Lang', description='The language of the content within the request and response. Default value: **zh**. Valid values:

*   **zh**: Chinese
*   **en**: English', example='zh'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the playbook UUID.

This parameter is required.', example='9fcd3829-80ff-4681-be1e-xxxxxxxx'),
}

model ModifyPlaybookInstanceStatusResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='C2A32830-2842-5F8F-B4ED-E4783E400BBE'),
}

model ModifyPlaybookInstanceStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyPlaybookInstanceStatusResponseBody(name='body'),
}

/**
 * @summary Modifies the status of a playbook.
 *
 * @param request ModifyPlaybookInstanceStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyPlaybookInstanceStatusResponse
 */
async function modifyPlaybookInstanceStatusWithOptions(request: ModifyPlaybookInstanceStatusRequest, runtime: $RuntimeOptions): ModifyPlaybookInstanceStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  var body : map[string]any = {};
  if (!$isNull(request.active)) {
    body['Active'] = request.active;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyPlaybookInstanceStatus',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Modifies the status of a playbook.
 *
 * @param request ModifyPlaybookInstanceStatusRequest
 * @return ModifyPlaybookInstanceStatusResponse
 */
async function modifyPlaybookInstanceStatus(request: ModifyPlaybookInstanceStatusRequest): ModifyPlaybookInstanceStatusResponse {
  var runtime = new $RuntimeOptions{};
  return modifyPlaybookInstanceStatusWithOptions(request, runtime);
}

model PublishPlaybookRequest {
  description?: string(name='Description', description='The description of the released version.', example='This is a waf processing playbook'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the playbook UUID.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxxxxx'),
}

model PublishPlaybookResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='C513FCEA-D71F-5E50-ADC4-FCF8C5DCF6BF'),
}

model PublishPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PublishPlaybookResponseBody(name='body'),
}

/**
 * @summary Publishes the playbook. After the playbook is published, the playbook runs based on the new logic.
 *
 * @param request PublishPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PublishPlaybookResponse
 */
async function publishPlaybookWithOptions(request: PublishPlaybookRequest, runtime: $RuntimeOptions): PublishPlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.description)) {
    body['Description'] = request.description;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'PublishPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Publishes the playbook. After the playbook is published, the playbook runs based on the new logic.
 *
 * @param request PublishPlaybookRequest
 * @return PublishPlaybookResponse
 */
async function publishPlaybook(request: PublishPlaybookRequest): PublishPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return publishPlaybookWithOptions(request, runtime);
}

model QueryTreeDataRequest {
  lang?: string(name='Lang', description='The language of the content within the response. Valid values:

*   **zh**: Chinese (default)
*   **en**: English', example='zh'),
}

model QueryTreeDataResponseBody = {
  playbooks?: string(name='Playbooks', description='The returned information about the playbook. The value is a JSON string.', example='[
    {
        "playbook": {
            "active": false,
            "displayName": "test_playbook",
            "playbookUuid": "09a20455-3d3a-424c-a1df-xxxxxx"
        }
    }
]'),
  requestId?: string(name='RequestId', description='The request ID.', example='EF2ECA2D-D8E6-5021-BF5C-19DD6D52C5B2'),
}

model QueryTreeDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: QueryTreeDataResponseBody(name='body'),
}

/**
 * @summary Queries all playbooks at a time.
 *
 * @param request QueryTreeDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return QueryTreeDataResponse
 */
async function queryTreeDataWithOptions(request: QueryTreeDataRequest, runtime: $RuntimeOptions): QueryTreeDataResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'QueryTreeData',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Queries all playbooks at a time.
 *
 * @param request QueryTreeDataRequest
 * @return QueryTreeDataResponse
 */
async function queryTreeData(request: QueryTreeDataRequest): QueryTreeDataResponse {
  var runtime = new $RuntimeOptions{};
  return queryTreeDataWithOptions(request, runtime);
}

model RenamePlaybookNodeRequest {
  lang?: string(name='Lang', description='The language of the content within the request and the response. Valid values:

*   **zh** (default): Chinese
*   **en**: English', example='zh'),
  newNodeName?: string(name='NewNodeName', description='The new name of the node.

This parameter is required.', example='waf_process'),
  oldNodeName?: string(name='OldNodeName', description='The original name of the node.

This parameter is required.', example='firewall_process'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the UUIDs of playbooks.

This parameter is required.', example='ac343acc-1a61-4084-9a1c-xxxxxxxx'),
}

model RenamePlaybookNodeResponseBody = {
  renameResult?: string(name='RenameResult', description='The returned new name of the node.', example='waf_process'),
  requestId?: string(name='RequestId', description='The request ID.', example='1E1EC464-3BD7-518F-9937-BCC12E6855FE'),
}

model RenamePlaybookNodeResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenamePlaybookNodeResponseBody(name='body'),
}

/**
 * @summary Changes the name of a node in a playbook. You can call this operation during playbook orchestration. After the name of the node is changed, the reference path of the node also changes.
 *
 * @param request RenamePlaybookNodeRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenamePlaybookNodeResponse
 */
async function renamePlaybookNodeWithOptions(request: RenamePlaybookNodeRequest, runtime: $RuntimeOptions): RenamePlaybookNodeResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.newNodeName)) {
    query['NewNodeName'] = request.newNodeName;
  }
  if (!$isNull(request.oldNodeName)) {
    query['OldNodeName'] = request.oldNodeName;
  }
  if (!$isNull(request.playbookUuid)) {
    query['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RenamePlaybookNode',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Changes the name of a node in a playbook. You can call this operation during playbook orchestration. After the name of the node is changed, the reference path of the node also changes.
 *
 * @param request RenamePlaybookNodeRequest
 * @return RenamePlaybookNodeResponse
 */
async function renamePlaybookNode(request: RenamePlaybookNodeRequest): RenamePlaybookNodeResponse {
  var runtime = new $RuntimeOptions{};
  return renamePlaybookNodeWithOptions(request, runtime);
}

model RevertPlaybookReleaseRequest {
  isPublish?: boolean(name='IsPublish', description='Specifies whether to directly publish the new playbook after the rollback.

*   **true** (default)
*   **false**', example='true'),
  playReleaseId?: int32(name='PlayReleaseId', description='The version of the playbook that you want to publish.

>  You can call the [DescribePlaybookReleases](~~DescribePlaybookReleases~~) operation to query the playbook version.

This parameter is required.', example='3f97b56e-064e-47e7-a309-xxxxxxx'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.

This parameter is required.', example='185295a1-c987-4b64-8796-xxxxxxxx'),
}

model RevertPlaybookReleaseResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='B3FED5B9-190A-5952-93A4-24FBF0F0C573'),
}

model RevertPlaybookReleaseResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RevertPlaybookReleaseResponseBody(name='body'),
}

/**
 * @summary Rolls back a playbook to a specific version. You can determine whether to publish the new playbook version during the rollback.
 *
 * @param request RevertPlaybookReleaseRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RevertPlaybookReleaseResponse
 */
async function revertPlaybookReleaseWithOptions(request: RevertPlaybookReleaseRequest, runtime: $RuntimeOptions): RevertPlaybookReleaseResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.isPublish)) {
    body['IsPublish'] = request.isPublish;
  }
  if (!$isNull(request.playReleaseId)) {
    body['PlayReleaseId'] = request.playReleaseId;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RevertPlaybookRelease',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Rolls back a playbook to a specific version. You can determine whether to publish the new playbook version during the rollback.
 *
 * @param request RevertPlaybookReleaseRequest
 * @return RevertPlaybookReleaseResponse
 */
async function revertPlaybookRelease(request: RevertPlaybookReleaseRequest): RevertPlaybookReleaseResponse {
  var runtime = new $RuntimeOptions{};
  return revertPlaybookReleaseWithOptions(request, runtime);
}

model RunNotifyComponentWithEmailRequest {
  actionName?: string(name='ActionName', description='This parameter is required.', example='notifyByCustom'),
  assetId?: int32(name='AssetId', description='This parameter is required.', example='10'),
  componentName?: string(name='ComponentName', description='This parameter is required.', example='NotifyMessage'),
  content?: string(name='Content', description='This parameter is required.', example='email content'),
  lang?: string(name='Lang', example='zh'),
  nodeName?: string(name='NodeName', description='This parameter is required.', example='notify_message_1'),
  playbookUuid?: string(name='PlaybookUuid', description='This parameter is required.', example='e99dab31-499b-4307-9248-xxxxxx'),
  receivers?: [ string ](name='Receivers', description='This parameter is required.'),
  roleFor?: long(name='RoleFor', example='137602xxx718726'),
  roleType?: string(name='RoleType', example='0'),
  subject?: string(name='Subject', description='This parameter is required.', example='title'),
}

model RunNotifyComponentWithEmailResponseBody = {
  data?: string(name='Data', example='{}'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='30'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='D4CC979E-3D5B-5A6A-BC87-C93C9E861C7B'),
}

model RunNotifyComponentWithEmailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunNotifyComponentWithEmailResponseBody(name='body'),
}

/**
 * @summary 执行通知组件-email发送消息
 *
 * @param request RunNotifyComponentWithEmailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunNotifyComponentWithEmailResponse
 */
async function runNotifyComponentWithEmailWithOptions(request: RunNotifyComponentWithEmailRequest, runtime: $RuntimeOptions): RunNotifyComponentWithEmailResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!$isNull(request.assetId)) {
    query['AssetId'] = request.assetId;
  }
  if (!$isNull(request.componentName)) {
    query['ComponentName'] = request.componentName;
  }
  if (!$isNull(request.content)) {
    query['Content'] = request.content;
  }
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.nodeName)) {
    query['NodeName'] = request.nodeName;
  }
  if (!$isNull(request.playbookUuid)) {
    query['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.receivers)) {
    query['Receivers'] = request.receivers;
  }
  if (!$isNull(request.roleFor)) {
    query['RoleFor'] = request.roleFor;
  }
  if (!$isNull(request.roleType)) {
    query['RoleType'] = request.roleType;
  }
  if (!$isNull(request.subject)) {
    query['Subject'] = request.subject;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RunNotifyComponentWithEmail',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 执行通知组件-email发送消息
 *
 * @param request RunNotifyComponentWithEmailRequest
 * @return RunNotifyComponentWithEmailResponse
 */
async function runNotifyComponentWithEmail(request: RunNotifyComponentWithEmailRequest): RunNotifyComponentWithEmailResponse {
  var runtime = new $RuntimeOptions{};
  return runNotifyComponentWithEmailWithOptions(request, runtime);
}

model RunNotifyComponentWithMessageCenterRequest {
  actionName?: string(name='ActionName', description='This parameter is required.', example='notifyByMessageCenter'),
  aliuid?: string(name='Aliuid', description='This parameter is required.', example='146789xxxx733152'),
  assetId?: int32(name='AssetId', example='1'),
  channelTypeList?: [ string ](name='ChannelTypeList'),
  componentName?: string(name='ComponentName', description='This parameter is required.', example='NotifyMessage'),
  eventId?: string(name='EventId', description='This parameter is required.', example='yundun_soar_incident_generate'),
  lang?: string(name='Lang', example='zh'),
  nodeName?: string(name='NodeName', description='This parameter is required.', example='notify_message'),
  params?: string(name='Params', example='{"startTime":"test222","incidentName":"test123","incidentID":"teset123"}'),
  playbookUuid?: string(name='PlaybookUuid', description='This parameter is required.', example='c5c88b5e-97ca-435d-8c20-xxxxxx'),
  roleFor?: long(name='RoleFor', example='1467894xxx733152'),
  roleType?: string(name='RoleType', example='0'),
}

model RunNotifyComponentWithMessageCenterResponseBody = {
  data?: string(name='Data', example='{}'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='30'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='E7698CFB-4E1C-5840-8EC9-691B86729E94'),
}

model RunNotifyComponentWithMessageCenterResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunNotifyComponentWithMessageCenterResponseBody(name='body'),
}

/**
 * @summary 执行通知组件-消息中心发送消息
 *
 * @param request RunNotifyComponentWithMessageCenterRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunNotifyComponentWithMessageCenterResponse
 */
async function runNotifyComponentWithMessageCenterWithOptions(request: RunNotifyComponentWithMessageCenterRequest, runtime: $RuntimeOptions): RunNotifyComponentWithMessageCenterResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!$isNull(request.aliuid)) {
    query['Aliuid'] = request.aliuid;
  }
  if (!$isNull(request.assetId)) {
    query['AssetId'] = request.assetId;
  }
  if (!$isNull(request.channelTypeList)) {
    query['ChannelTypeList'] = request.channelTypeList;
  }
  if (!$isNull(request.componentName)) {
    query['ComponentName'] = request.componentName;
  }
  if (!$isNull(request.eventId)) {
    query['EventId'] = request.eventId;
  }
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.nodeName)) {
    query['NodeName'] = request.nodeName;
  }
  if (!$isNull(request.params)) {
    query['Params'] = request.params;
  }
  if (!$isNull(request.playbookUuid)) {
    query['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.roleFor)) {
    query['RoleFor'] = request.roleFor;
  }
  if (!$isNull(request.roleType)) {
    query['RoleType'] = request.roleType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RunNotifyComponentWithMessageCenter',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 执行通知组件-消息中心发送消息
 *
 * @param request RunNotifyComponentWithMessageCenterRequest
 * @return RunNotifyComponentWithMessageCenterResponse
 */
async function runNotifyComponentWithMessageCenter(request: RunNotifyComponentWithMessageCenterRequest): RunNotifyComponentWithMessageCenterResponse {
  var runtime = new $RuntimeOptions{};
  return runNotifyComponentWithMessageCenterWithOptions(request, runtime);
}

model RunNotifyComponentWithWebhookRequest {
  actionName?: string(name='ActionName', description='This parameter is required.', example='notifyByCustom'),
  assetId?: int32(name='AssetId', example='1'),
  componentName?: string(name='ComponentName', description='This parameter is required.', example='NotifyMessage'),
  content?: string(name='Content', description='This parameter is required.', example='{
    "at": {
        "atMobiles":[
            "180xxxxxx"
        ],
        "atUserIds":[
            "user123"
        ],
        "isAtAll": false
    },
    "text": {
        "content":"1234"
    },
    "msgtype":"text"
}'),
  lang?: string(name='Lang', example='zh'),
  msgType?: string(name='MsgType', description='This parameter is required.', example='text'),
  nodeName?: string(name='NodeName', description='This parameter is required.', example='notify_message_node'),
  playbookUuid?: string(name='PlaybookUuid', description='This parameter is required.', example='94bc318c-****-4cba-****-801ccb0d739f'),
  roleFor?: long(name='RoleFor', example='126339xxxx805497'),
  roleType?: string(name='RoleType', example='0'),
  secret?: string(name='Secret', example='SECc1*****e157b32b380f********bb8c70e1a67a22072'),
  webhook?: string(name='Webhook', description='This parameter is required.', example='[\\\\"10651\\\\"]'),
}

model RunNotifyComponentWithWebhookResponseBody = {
  data?: string(name='Data', example='{}'),
  page?: {
    pageNumber?: int32(name='PageNumber', example='1'),
    pageSize?: int32(name='PageSize', example='10'),
    totalCount?: int32(name='TotalCount', example='30'),
  }(name='Page'),
  requestId?: string(name='RequestId', example='E7698CFB-****-5840-8EC9-691B86729E94'),
}

model RunNotifyComponentWithWebhookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunNotifyComponentWithWebhookResponseBody(name='body'),
}

/**
 * @summary 执行通知组件-webhook发送消息
 *
 * @param request RunNotifyComponentWithWebhookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunNotifyComponentWithWebhookResponse
 */
async function runNotifyComponentWithWebhookWithOptions(request: RunNotifyComponentWithWebhookRequest, runtime: $RuntimeOptions): RunNotifyComponentWithWebhookResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!$isNull(request.assetId)) {
    query['AssetId'] = request.assetId;
  }
  if (!$isNull(request.componentName)) {
    query['ComponentName'] = request.componentName;
  }
  if (!$isNull(request.content)) {
    query['Content'] = request.content;
  }
  if (!$isNull(request.lang)) {
    query['Lang'] = request.lang;
  }
  if (!$isNull(request.msgType)) {
    query['MsgType'] = request.msgType;
  }
  if (!$isNull(request.nodeName)) {
    query['NodeName'] = request.nodeName;
  }
  if (!$isNull(request.playbookUuid)) {
    query['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.roleFor)) {
    query['RoleFor'] = request.roleFor;
  }
  if (!$isNull(request.roleType)) {
    query['RoleType'] = request.roleType;
  }
  if (!$isNull(request.secret)) {
    query['Secret'] = request.secret;
  }
  if (!$isNull(request.webhook)) {
    query['Webhook'] = request.webhook;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RunNotifyComponentWithWebhook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 执行通知组件-webhook发送消息
 *
 * @param request RunNotifyComponentWithWebhookRequest
 * @return RunNotifyComponentWithWebhookResponse
 */
async function runNotifyComponentWithWebhook(request: RunNotifyComponentWithWebhookRequest): RunNotifyComponentWithWebhookResponse {
  var runtime = new $RuntimeOptions{};
  return runNotifyComponentWithWebhookWithOptions(request, runtime);
}

model RunPython3ScriptRequest {
  nodeName?: string(name='NodeName', description='The name of the node in the playbook.', example='python3_3'),
  params?: string(name='Params', description='The input parameters of the Python3 script.', example='{
    "input1": "xx.xx.xx.xx",
    "input2": "7d"
}'),
  playbookUuid?: string(name='PlaybookUuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the UUIDs of playbooks.', example='8baa6cff-319e-4ede-97bc-xxxxxxx'),
  pythonScript?: string(name='PythonScript', description='The Python3 script.', example='import logging
def execute (params):
  #ip = params[\\\\"ip\\\\"]
  #logging.info("enter execute,ip is "+ip)
  success=True
  message=\\\\"OK\\\\"
  data=[]
  return (success,message,data)'),
}

model RunPython3ScriptResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='F210521C-D9BF-5264-8369-83EDDC617DB0'),
  runResult?: string(name='RunResult', description='The execution result of the Python3 script.', example='{
    "requestUuid": "fe240b98-27b1-4a36-aec1-550b894318d9",
    "content": {
        "resultData": [],
        "success": true
    }
}'),
}

model RunPython3ScriptResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RunPython3ScriptResponseBody(name='body'),
}

/**
 * @summary Submits and runs a Python3 script. You can call this operation only for data processing.
 *
 * @description Before you call this operation, make sure that you understand the billing method and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=openapi-amp.newDocPublishment.0.0.4c41281fWhbdPa#/commodity/vm_intl).
 *
 * @param request RunPython3ScriptRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RunPython3ScriptResponse
 */
async function runPython3ScriptWithOptions(request: RunPython3ScriptRequest, runtime: $RuntimeOptions): RunPython3ScriptResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.nodeName)) {
    body['NodeName'] = request.nodeName;
  }
  if (!$isNull(request.params)) {
    body['Params'] = request.params;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.pythonScript)) {
    body['PythonScript'] = request.pythonScript;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'RunPython3Script',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Submits and runs a Python3 script. You can call this operation only for data processing.
 *
 * @description Before you call this operation, make sure that you understand the billing method and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=openapi-amp.newDocPublishment.0.0.4c41281fWhbdPa#/commodity/vm_intl).
 *
 * @param request RunPython3ScriptRequest
 * @return RunPython3ScriptResponse
 */
async function runPython3Script(request: RunPython3ScriptRequest): RunPython3ScriptResponse {
  var runtime = new $RuntimeOptions{};
  return runPython3ScriptWithOptions(request, runtime);
}

model TriggerPlaybookRequest {
  inputParam?: string(name='InputParam', description='The input parameters of the playbook.

This parameter is required.', example='{
    "input1": "xx.xx.xx.xx",
    "input2": "7d"
}'),
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the playbook UUID.

This parameter is required.', example='2a687089-d4dd-47d4-9709-xxxxxxxx'),
}

model TriggerPlaybookResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='BD5A8DB6-A42C-532B-BCE8-83E69550CD59'),
  triggerUuid?: string(name='TriggerUuid', description='The running UUID of the playbook. This parameter is used to query the running result of the playbook.', example='55E63C57-D6C8-5036-A770-5CB10AC807AA'),
}

model TriggerPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TriggerPlaybookResponseBody(name='body'),
}

/**
 * @summary Triggers an enabled custom playbook or a predefined playbook.
 *
 * @description Before you call this operation, make sure that you understand the billing methods and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=a2796.7960336.3034855210.1.7adab91arMeIx2#/commodity/vm_intl).
 *
 * @param request TriggerPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TriggerPlaybookResponse
 */
async function triggerPlaybookWithOptions(request: TriggerPlaybookRequest, runtime: $RuntimeOptions): TriggerPlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.inputParam)) {
    body['InputParam'] = request.inputParam;
  }
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'TriggerPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Triggers an enabled custom playbook or a predefined playbook.
 *
 * @description Before you call this operation, make sure that you understand the billing methods and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=a2796.7960336.3034855210.1.7adab91arMeIx2#/commodity/vm_intl).
 *
 * @param request TriggerPlaybookRequest
 * @return TriggerPlaybookResponse
 */
async function triggerPlaybook(request: TriggerPlaybookRequest): TriggerPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return triggerPlaybookWithOptions(request, runtime);
}

model TriggerProcessTaskRequest {
  actionType?: string(name='ActionType', description='The type of the action. Valid values:

*   **remove**: cancels blocking or isolation.
*   **retry**: submits the task again.

This parameter is required.', example='remove'),
  taskId?: string(name='TaskId', description='The ID of the handling task.

>  You can call the [DescribeProcessTasks](~~DescribeProcessTasks~~) operation to query the IDs of handling tasks.

This parameter is required.', example='15355xxxxxx82894882'),
}

model TriggerProcessTaskResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='58A518BC-E4A8-5BD7-AFEA-366046ED9073'),
}

model TriggerProcessTaskResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TriggerProcessTaskResponseBody(name='body'),
}

/**
 * @summary Performs an action on a handling task that is generated by the handling center when an event is handled by using Security Orchestration Automation Response (SOAR). For example, you can call this operation to cancel blocking or isolation, or retry blocking.
 *
 * @param request TriggerProcessTaskRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TriggerProcessTaskResponse
 */
async function triggerProcessTaskWithOptions(request: TriggerProcessTaskRequest, runtime: $RuntimeOptions): TriggerProcessTaskResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionType)) {
    query['ActionType'] = request.actionType;
  }
  var body : map[string]any = {};
  if (!$isNull(request.taskId)) {
    body['TaskId'] = request.taskId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'TriggerProcessTask',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Performs an action on a handling task that is generated by the handling center when an event is handled by using Security Orchestration Automation Response (SOAR). For example, you can call this operation to cancel blocking or isolation, or retry blocking.
 *
 * @param request TriggerProcessTaskRequest
 * @return TriggerProcessTaskResponse
 */
async function triggerProcessTask(request: TriggerProcessTaskRequest): TriggerProcessTaskResponse {
  var runtime = new $RuntimeOptions{};
  return triggerProcessTaskWithOptions(request, runtime);
}

model TriggerSophonPlaybookRequest {
  commandName?: string(name='CommandName', description='The name of the command that you want to trigger.

>  You can call the [DescribeSophonCommands](~~DescribeSophonCommands~~) operation to query the command name.', example='waf_process_command'),
  inputParams?: string(name='InputParams', description='The input parameters of the command or playbook that you want to trigger.

This parameter is required.', example='{
    "param1": "xx.xx.xx.xx",
    "param2": "7d"
}'),
  sophonTaskId?: string(name='SophonTaskId', description='The custom ID. If you do not specify this parameter when the playbook is triggered, a random ID is generated for fault locating and troubleshooting.', example='f916b93e-e814-459f-9662-xxxxxxxxxx'),
  triggerType?: string(name='TriggerType', description='The task type. Valid values:

*   **command**
*   **playbook**', example='playbook'),
  uuid?: string(name='Uuid', description='The UUID of the playbook.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~)operation to query the playbook UUID.', example='f916b93e-e814-459f-9662-xxxxxxxxxx'),
}

model TriggerSophonPlaybookResponseBody = {
  data?: {
    sophonTaskId?: string(name='SophonTaskId', description='The custom ID. If you do not specify this parameter when the playbook is triggered, a random ID is generated for fault locating and troubleshooting.', example='a7c6d055-a72f-4676-bc89-3cd9edc0284c'),
  }(name='Data', description='The details that is returned after the command or playbook is triggered.'),
  requestId?: string(name='RequestId', description='The request ID.', example='0DFC9403-54EB-5672-B690-9AA93C9EBB54'),
}

model TriggerSophonPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: TriggerSophonPlaybookResponseBody(name='body'),
}

/**
 * @summary Triggers a playbook or a command.
 *
 * @description Before you call this operation, make sure that you understand the billing methods and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=a2796.7960336.3034855210.1.7adab91arMeIx2#/commodity/vm_intl).
 *
 * @param request TriggerSophonPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return TriggerSophonPlaybookResponse
 */
async function triggerSophonPlaybookWithOptions(request: TriggerSophonPlaybookRequest, runtime: $RuntimeOptions): TriggerSophonPlaybookResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.commandName)) {
    query['CommandName'] = request.commandName;
  }
  if (!$isNull(request.inputParams)) {
    query['InputParams'] = request.inputParams;
  }
  if (!$isNull(request.sophonTaskId)) {
    query['SophonTaskId'] = request.sophonTaskId;
  }
  if (!$isNull(request.triggerType)) {
    query['TriggerType'] = request.triggerType;
  }
  if (!$isNull(request.uuid)) {
    query['Uuid'] = request.uuid;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'TriggerSophonPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Triggers a playbook or a command.
 *
 * @description Before you call this operation, make sure that you understand the billing methods and pricing of Security Orchestration Automation Response (SOAR). For more information, see [Pricing](https://www.alibabacloud.com/en/pricing-calculator?_p_lc=1&spm=a2796.7960336.3034855210.1.7adab91arMeIx2#/commodity/vm_intl).
 *
 * @param request TriggerSophonPlaybookRequest
 * @return TriggerSophonPlaybookResponse
 */
async function triggerSophonPlaybook(request: TriggerSophonPlaybookRequest): TriggerSophonPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return triggerSophonPlaybookWithOptions(request, runtime);
}

model VerifyPlaybookRequest {
  playbookUuid?: string(name='PlaybookUuid', description='The playbook UUID.

>  You can call the [DescribePlaybooks](~~DescribePlaybooks~~) operation to query the playbook UUID.

This parameter is required.', example='9fcd3829-80ff-4681-be1e-4d2662c35fed'),
  taskFlow?: string(name='TaskFlow', description='The XML configuration of the playbook.

This parameter is required.', example='<?xml version="1.0" encoding="UTF-8"?><bpmn:definitions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://bpmn.io/schema/bpmn" id="Definitions_1"><bpmn:process id="Process_1" isExecutable="false"><bpmn:startEvent id="StartEvent_1"/></bpmn:process><bpmndi:BPMNDiagram id="BPMNDiagram_1"><bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_1"><bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1"><dc:Bounds height="36.0" width="36.0" x="173.0" y="102.0"/></bpmndi:BPMNShape></bpmndi:BPMNPlane></bpmndi:BPMNDiagram></bpmn:definitions>'),
}

model VerifyPlaybookResponseBody = {
  checkTaskInfos?: [ 
    {
      detail?: string(name='Detail', description='The error message returned when the playbook does not pass the check.', example='Node [python3_3] doesn\\\\"t have the asset information'),
      nodeName?: string(name='NodeName', description='The name of the node in the playbook.', example='python3_3'),
      riskLevel?: string(name='RiskLevel', description='The severity level of the verification information. Valid values:

*   warn: An issue may occur during playbook running.
*   error: The playbook cannot be compiled.
*   remind: The publishing and running of the playbook are not affected. We recommend that you optimize the playbook format.', example='error'),
    }
  ](name='CheckTaskInfos', description='The result of the verification.'),
  requestId?: string(name='RequestId', description='The request ID.', example='0DFC9403-54EB-5672-B690-9AA93C9EBB54'),
}

model VerifyPlaybookResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: VerifyPlaybookResponseBody(name='body'),
}

/**
 * @summary Checks whether the configuration of the playbook is correct and whether the logic of the orchestration is reasonable.
 *
 * @param request VerifyPlaybookRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return VerifyPlaybookResponse
 */
async function verifyPlaybookWithOptions(request: VerifyPlaybookRequest, runtime: $RuntimeOptions): VerifyPlaybookResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.playbookUuid)) {
    body['PlaybookUuid'] = request.playbookUuid;
  }
  if (!$isNull(request.taskFlow)) {
    body['TaskFlow'] = request.taskFlow;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'VerifyPlaybook',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Checks whether the configuration of the playbook is correct and whether the logic of the orchestration is reasonable.
 *
 * @param request VerifyPlaybookRequest
 * @return VerifyPlaybookResponse
 */
async function verifyPlaybook(request: VerifyPlaybookRequest): VerifyPlaybookResponse {
  var runtime = new $RuntimeOptions{};
  return verifyPlaybookWithOptions(request, runtime);
}

model VerifyPythonFileRequest {
  content?: string(name='Content', description='The Python code snippet.

This parameter is required.', example='import logging
def execute (params):
  success=True
  message=\\\\"OK\\\\"
  data=[]
  return (success,message,data)'),
}

model VerifyPythonFileResponseBody = {
  requestId?: string(name='RequestId', description='The request ID.', example='F72685FB-A6E6-5A9A-97F7-6DC1056E63CE'),
  syntax?: [ 
    {
      endColumn?: int32(name='EndColumn', description='The number that indicates the end column of the error code.', example='5'),
      endLineNumber?: int32(name='EndLineNumber', description='The number that indicates the end line of the error code.', example='5'),
      message?: string(name='Message', description='The error message for the error code.', example='undefined name \\\\"ab\\\\"'),
      severity?: int32(name='Severity', description='The severity level of the error code. Valid values:

*   4: moderate
*   8: serious', example='4'),
      startColumn?: int32(name='StartColumn', description='The number that indicates the start column of the error code.', example='2'),
      startLineNumber?: int32(name='StartLineNumber', description='The number that indicates the start line of the error code.', example='2'),
    }
  ](name='Syntax', description='The verification result. If the parameter is left empty, the syntax of the code snippet is correct.'),
}

model VerifyPythonFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: VerifyPythonFileResponseBody(name='body'),
}

/**
 * @summary Checks whether the syntax of a Python code snippet is correct.
 *
 * @param request VerifyPythonFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return VerifyPythonFileResponse
 */
async function verifyPythonFileWithOptions(request: VerifyPythonFileRequest, runtime: $RuntimeOptions): VerifyPythonFileResponse {
  request.validate();
  var body : map[string]any = {};
  if (!$isNull(request.content)) {
    body['Content'] = request.content;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'VerifyPythonFile',
    version = '2022-07-28',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary Checks whether the syntax of a Python code snippet is correct.
 *
 * @param request VerifyPythonFileRequest
 * @return VerifyPythonFileResponse
 */
async function verifyPythonFile(request: VerifyPythonFileRequest): VerifyPythonFileResponse {
  var runtime = new $RuntimeOptions{};
  return verifyPythonFileWithOptions(request, runtime);
}

